diff options
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/pgtable-2level.h | 8 | ||||
-rw-r--r-- | include/asm-x86/pgtable-3level.h | 8 | ||||
-rw-r--r-- | include/asm-x86/pgtable.h | 1 |
3 files changed, 1 insertions, 16 deletions
diff --git a/include/asm-x86/pgtable-2level.h b/include/asm-x86/pgtable-2level.h index ce486bdbbbb..701404fab30 100644 --- a/include/asm-x86/pgtable-2level.h +++ b/include/asm-x86/pgtable-2level.h @@ -56,14 +56,6 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp) #define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT) /* - * All present pages are kernel-executable: - */ -static inline int pte_exec_kernel(pte_t pte) -{ - return 1; -} - -/* * Bits 0, 6 and 7 are taken, split up the 29 bits of offset * into this range: */ diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h index 62bb06575d5..62a1ffbc878 100644 --- a/include/asm-x86/pgtable-3level.h +++ b/include/asm-x86/pgtable-3level.h @@ -19,14 +19,6 @@ #define pud_bad(pud) 0 #define pud_present(pud) 1 -/* - * All present pages with !NX bit are kernel-executable: - */ -static inline int pte_exec_kernel(pte_t pte) -{ - return !(pte_val(pte) & _PAGE_NX); -} - /* Rules for using set_pte: the pte being assigned *must* be * either not present or in a state where the hardware will * not attempt to update the pte. In places where this is diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 75a656e6b3f..2f3d90807ef 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h @@ -139,6 +139,7 @@ static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } static inline int pte_huge(pte_t pte) { return pte_val(pte) & _PAGE_PSE; } +static inline int pte_exec(pte_t pte) { return !(pte_val(pte) & _PAGE_NX); } static inline int pmd_large(pmd_t pte) { return (pmd_val(pte) & (_PAGE_PSE|_PAGE_PRESENT)) == |