|
@@ -13,6 +13,7 @@
|
|
|
|
|
|
#include <asm/cputable.h>
|
|
#include <asm/cputable.h>
|
|
#include <linux/mm.h>
|
|
#include <linux/mm.h>
|
|
|
|
+#include <linux/pkeys.h>
|
|
#include <asm/cpu_has_feature.h>
|
|
#include <asm/cpu_has_feature.h>
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -22,7 +23,11 @@
|
|
static inline unsigned long arch_calc_vm_prot_bits(unsigned long prot,
|
|
static inline unsigned long arch_calc_vm_prot_bits(unsigned long prot,
|
|
unsigned long pkey)
|
|
unsigned long pkey)
|
|
{
|
|
{
|
|
- return (prot & PROT_SAO) ? VM_SAO : 0;
|
|
|
|
|
|
+#ifdef CONFIG_PPC_MEM_KEYS
|
|
|
|
+ return (((prot & PROT_SAO) ? VM_SAO : 0) | pkey_to_vmflag_bits(pkey));
|
|
|
|
+#else
|
|
|
|
+ return ((prot & PROT_SAO) ? VM_SAO : 0);
|
|
|
|
+#endif
|
|
}
|
|
}
|
|
#define arch_calc_vm_prot_bits(prot, pkey) arch_calc_vm_prot_bits(prot, pkey)
|
|
#define arch_calc_vm_prot_bits(prot, pkey) arch_calc_vm_prot_bits(prot, pkey)
|
|
|
|
|