Messages in this thread | | | Date | Tue, 1 Feb 2022 17:00:53 -0800 | From | Ira Weiny <> | Subject | Re: [PATCH V8 03/44] x86/pkeys: Create pkeys_common.h |
| |
On Fri, Jan 28, 2022 at 02:43:54PM -0800, Dave Hansen wrote: > On 1/27/22 09:54, ira.weiny@intel.com wrote: > > From: Ira Weiny <ira.weiny@intel.com> > > > > Protection Keys User (PKU) and Protection Keys Supervisor (PKS) work in > > similar fashions and can share common defines. Specifically PKS and PKU > > each have: > > > > 1. A single control register > > 2. The same number of keys > > 3. The same number of bits in the register per key > > 4. Access and Write disable in the same bit locations > > > > Given the above, share all the macros that synthesize and manipulate > > register values between the two features. Share these defines by moving > > them into a new header, change their names to reflect the common use, > > and include the header where needed. > > I'd probably include *one* more sentence to prime the reader for the > pattern they are about to see. Perhaps: > > This mostly takes the form of converting names from the PKU- > specific "PKRU" to the U/S-agnostic "PKR".
Fair enough.
> > > Also while editing the code remove the use of 'we' from comments being > > touched. > > > > NOTE the checkpatch errors are ignored for the init_pkru_value to > > align the values in the code. > > > > Signed-off-by: Ira Weiny <ira.weiny@intel.com> > > Either way, this looks fine: > > Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Thanks! Ira
| |