summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/pgtable.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2008-01-30 13:33:42 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:33:42 +0100
commit4c3c4b4513a361cc6ac5ee8677695260c4f0f25f (patch)
tree3a56ada5131a85fff2bb37841d822d098b92f68c /include/asm-x86/pgtable.h
parente66a95127dc4273d3573eb03657991f7bbd5dca3 (diff)
downloadlinux-4c3c4b4513a361cc6ac5ee8677695260c4f0f25f.tar.gz
linux-4c3c4b4513a361cc6ac5ee8677695260c4f0f25f.tar.bz2
linux-4c3c4b4513a361cc6ac5ee8677695260c4f0f25f.zip
x86: clean up pte_exec
- Rename it to pte_exec() from pte_exec_kernel(). There is nothing kernel specific in there. - Move it into the common file because _PAGE_NX is 0 on !PAE and then pte_exec() will be always evaluate to true. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/pgtable.h')
-rw-r--r--include/asm-x86/pgtable.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
index 75a656e6b3f8..2f3d90807efb 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)) ==