summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaura Abbott <lauraa@codeaurora.org>2013-06-17 19:29:12 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-12-11 10:53:18 +0100
commit27ec8da4ace46900a71b8462157aa2bc88ff5d2c (patch)
tree6c60a78a829f5758167c577a004d2cf15a650e3b
parentARM: implement basic NX support for kernel lowmem mappings (diff)
downloadlinux-27ec8da4ace46900a71b8462157aa2bc88ff5d2c.tar.xz
linux-27ec8da4ace46900a71b8462157aa2bc88ff5d2c.zip
ARM: add definitions for pte_mkexec/pte_mknexec
Other architectures define pte_mkexec to mark a pte as executable. Add pte_mkexec for ARM to get the same functionality. Although no other architectures currently define it, also add pte_mknexec to explicitly allow a pte to be marked as non executable. Signed-off-by: Laura Abbott <lauraa@codeaurora.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/include/asm/pgtable.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index be956dbf6bae..910d2741c031 100644
--- a/arch/arm/include/asm/pgtable.h
+++ b/arch/arm/include/asm/pgtable.h
@@ -254,6 +254,8 @@ PTE_BIT_FUNC(mkclean, &= ~L_PTE_DIRTY);
PTE_BIT_FUNC(mkdirty, |= L_PTE_DIRTY);
PTE_BIT_FUNC(mkold, &= ~L_PTE_YOUNG);
PTE_BIT_FUNC(mkyoung, |= L_PTE_YOUNG);
+PTE_BIT_FUNC(mkexec, &= ~L_PTE_XN);
+PTE_BIT_FUNC(mknexec, |= L_PTE_XN);
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }