lkml.org 
[lkml]   [2022]   [Jan]   [28]   [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 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".

> 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>

\
 
 \ /
  Last update: 2022-01-28 23:45    [W:0.613 / U:1.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site