diff options
author | Andi Kleen <ak@suse.de> | 2008-01-30 07:33:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:42 -0500 |
commit | a5a5dc31794c3271c066835ad2c90c58a3805569 (patch) | |
tree | df94d4e5460dcc16d4bd7b71b1287b445b2e69d7 | |
parent | 4c3c4b4513a361cc6ac5ee8677695260c4f0f25f (diff) |
x86: add pte accessors for the global bit
Needed for some test code.
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>
-rw-r--r-- | include/asm-x86/pgtable.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 2f3d90807efb..18a5f9e32834 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; | |||
139 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | 139 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } |
140 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 140 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
141 | static inline int pte_huge(pte_t pte) { return pte_val(pte) & _PAGE_PSE; } | 141 | static inline int pte_huge(pte_t pte) { return pte_val(pte) & _PAGE_PSE; } |
142 | static inline int pte_global(pte_t pte) { return pte_val(pte) & _PAGE_GLOBAL; } | ||
142 | static inline int pte_exec(pte_t pte) { return !(pte_val(pte) & _PAGE_NX); } | 143 | static inline int pte_exec(pte_t pte) { return !(pte_val(pte) & _PAGE_NX); } |
143 | 144 | ||
144 | static inline int pmd_large(pmd_t pte) { | 145 | static inline int pmd_large(pmd_t pte) { |
@@ -155,6 +156,8 @@ static inline pte_t pte_mkyoung(pte_t pte) { return __pte(pte_val(pte) | _PAGE_A | |||
155 | static inline pte_t pte_mkwrite(pte_t pte) { return __pte(pte_val(pte) | _PAGE_RW); } | 156 | static inline pte_t pte_mkwrite(pte_t pte) { return __pte(pte_val(pte) | _PAGE_RW); } |
156 | static inline pte_t pte_mkhuge(pte_t pte) { return __pte(pte_val(pte) | _PAGE_PSE); } | 157 | static inline pte_t pte_mkhuge(pte_t pte) { return __pte(pte_val(pte) | _PAGE_PSE); } |
157 | static inline pte_t pte_clrhuge(pte_t pte) { return __pte(pte_val(pte) & ~_PAGE_PSE); } | 158 | static inline pte_t pte_clrhuge(pte_t pte) { return __pte(pte_val(pte) & ~_PAGE_PSE); } |
159 | static inline pte_t pte_mkglobal(pte_t pte) { return __pte(pte_val(pte) | _PAGE_GLOBAL); } | ||
160 | static inline pte_t pte_clrglobal(pte_t pte) { return __pte(pte_val(pte) & ~_PAGE_GLOBAL); } | ||
158 | 161 | ||
159 | extern pteval_t __supported_pte_mask; | 162 | extern pteval_t __supported_pte_mask; |
160 | 163 | ||