powerpc: helper functions to initialize AMR, IAMR and UAMOR registers
RFC v7 4/25 powerpc: helper functions to initialize AMR, IAMR and UAMOR registers
Introduce helper functions that can initialize the bits in the AMR, IAMR and UAMOR register; the bits that correspond to the given pkey.
Signed-off-by Ram Pai <[email protected]>
--- arch/powerpc/include/asm/pkeys.h | 1 + arch/powerpc/mm/pkeys.c | 46 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 0 deletions(-)
arch/powerpc/include/asm/pkeys.h +1 -0
@@ -25,6 +25,7 @@#define arch_max_pkey () pkeys_total#define ARCH_VM_PKEY_FLAGS (VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | \ VM_PKEY_BIT3 | VM_PKEY_BIT4) +#define AMR_BITS_PER_PKEY 2#define pkey_alloc_mask (pkey) (0x1 << pkey)
arch/powerpc/mm/pkeys.c +46 -0
49 lines not on this page · raw message
Signature · 1 line
1.7.1