Ram Pai <linux...@us.ibm.com> writes: > Total 32 keys are available on power7 and above. However > pkey 0,1 are reserved. So effectively we have 30 pkeys.
When you say reserved, reserved by whom? Is that part of ISA or PAPR ? Also do you expect that to change. If not why all these indirection? Can we have the mask as a #define for 4K and 64K page size config? > > On 4K kernels, we do not have 5 bits in the PTE to > represent all the keys; we only have 3bits.Two of those > keys are reserved; pkey 0 and pkey 1. So effectively we > have 6 pkeys. > > This patch keeps track of reserved keys, allocated keys > and keys that are currently free. > > Also it adds skeletal functions and macros, that the > architecture-independent code expects to be available. -aneesh