Skip to contentSkip to conversation

powerpc: helper functions to initialize AMR, IAMR and UAMOR registers

RFC Superseded Ram Pai 1 participant 1 message Jul 30, 2017 PowerPC

v7 of 14 Superseded Latest is v14 →

lore
Share & tools
lore

Ram Pai

author
#0 lore raw

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.

---
 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
index def385f..f1c55e0 100644
@@ -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