summaryrefslogtreecommitdiff
path: root/include/linux/pkeys.h
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2018-04-11 16:41:42 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2018-05-09 04:50:41 +0300
commitdbec10e58deadba596d59a0ab4a394fef271992f (patch)
treeab9cdbcbbe1989a41bd06df29e5363f94e23a9a5 /include/linux/pkeys.h
parentcd419a513146367af08b895a8f7d360e4e77b638 (diff)
downloadlinux-dbec10e58deadba596d59a0ab4a394fef271992f.tar.xz
mm/pkeys, powerpc, x86: Provide an empty vma_pkey() in linux/pkeys.h
Consolidate the pkey handling by providing a common empty definition of vma_pkey() in pkeys.h when CONFIG_ARCH_HAS_PKEYS=n. This also removes another entanglement of pkeys.h and asm/mmu_context.h. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Reviewed-by: Ram Pai <linuxram@us.ibm.com> Reviewed-by: Dave Hansen <dave.hansen@intel.com>
Diffstat (limited to 'include/linux/pkeys.h')
-rw-r--r--include/linux/pkeys.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pkeys.h b/include/linux/pkeys.h
index ed06e1a67bfa..aad54663763b 100644
--- a/include/linux/pkeys.h
+++ b/include/linux/pkeys.h
@@ -13,6 +13,11 @@
#define PKEY_DEDICATED_EXECUTE_ONLY 0
#define ARCH_VM_PKEY_FLAGS 0
+static inline int vma_pkey(struct vm_area_struct *vma)
+{
+ return 0;
+}
+
static inline bool mm_pkey_is_allocated(struct mm_struct *mm, int pkey)
{
return (pkey == 0);