lkml.org 
[lkml]   [2022]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2022-02-02 02:02    [W:0.114 / U:1.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site