diff options
author | Ram Pai <linuxram@us.ibm.com> | 2018-03-27 02:09:26 -0700 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-05-09 00:35:33 +1000 |
commit | 5212213aa5a2359dd0474c9dab22b6220b591fe1 (patch) | |
tree | 1ed1961959d7c999f27f6066f0d8e62f071233d5 /arch/powerpc/include/asm/pkeys.h | |
parent | 6da6c0db5316275015e8cc2959f12a17584aeb64 (diff) | |
download | linux-5212213aa5a2359dd0474c9dab22b6220b591fe1.tar.gz linux-5212213aa5a2359dd0474c9dab22b6220b591fe1.tar.bz2 linux-5212213aa5a2359dd0474c9dab22b6220b591fe1.zip |
mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS is enabled
VM_PKEY_BITx are defined only if CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
is enabled. Powerpc also needs these bits. Hence lets define the
VM_PKEY_BITx bits for any architecture that enables
CONFIG_ARCH_HAS_PKEYS.
Reviewed-by: Dave Hansen <dave.hansen@intel.com>
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/pkeys.h')
-rw-r--r-- | arch/powerpc/include/asm/pkeys.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/pkeys.h b/arch/powerpc/include/asm/pkeys.h index 0409c80c32c0..18ef59a9886d 100644 --- a/arch/powerpc/include/asm/pkeys.h +++ b/arch/powerpc/include/asm/pkeys.h @@ -26,6 +26,8 @@ extern u32 initial_allocation_mask; /* bits set for reserved keys */ # define VM_PKEY_BIT2 VM_HIGH_ARCH_2 # define VM_PKEY_BIT3 VM_HIGH_ARCH_3 # define VM_PKEY_BIT4 VM_HIGH_ARCH_4 +#elif !defined(VM_PKEY_BIT4) +# define VM_PKEY_BIT4 VM_HIGH_ARCH_4 #endif #define ARCH_VM_PKEY_FLAGS (VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | \ |