diff options
Diffstat (limited to 'include/asm-x86_64/pgtable.h')
-rw-r--r-- | include/asm-x86_64/pgtable.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 51eba2395171..6899e770b173 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -21,12 +21,9 @@ extern unsigned long __supported_pte_mask; | |||
21 | 21 | ||
22 | #define swapper_pg_dir init_level4_pgt | 22 | #define swapper_pg_dir init_level4_pgt |
23 | 23 | ||
24 | extern int nonx_setup(char *str); | ||
25 | extern void paging_init(void); | 24 | extern void paging_init(void); |
26 | extern void clear_kernel_mapping(unsigned long addr, unsigned long size); | 25 | extern void clear_kernel_mapping(unsigned long addr, unsigned long size); |
27 | 26 | ||
28 | extern unsigned long pgkern_mask; | ||
29 | |||
30 | /* | 27 | /* |
31 | * ZERO_PAGE is a global shared page that is always zero: used | 28 | * ZERO_PAGE is a global shared page that is always zero: used |
32 | * for zero-mapped memory areas etc.. | 29 | * for zero-mapped memory areas etc.. |
@@ -265,7 +262,7 @@ static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) | |||
265 | #define __LARGE_PTE (_PAGE_PSE|_PAGE_PRESENT) | 262 | #define __LARGE_PTE (_PAGE_PSE|_PAGE_PRESENT) |
266 | static inline int pte_user(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | 263 | static inline int pte_user(pte_t pte) { return pte_val(pte) & _PAGE_USER; } |
267 | static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | 264 | static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; } |
268 | static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | 265 | static inline int pte_exec(pte_t pte) { return !(pte_val(pte) & _PAGE_NX); } |
269 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | 266 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } |
270 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 267 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
271 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | 268 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } |
@@ -278,11 +275,12 @@ static inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & | |||
278 | static inline pte_t pte_mkold(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; } | 275 | static inline pte_t pte_mkold(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; } |
279 | static inline pte_t pte_wrprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_RW)); return pte; } | 276 | static inline pte_t pte_wrprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_RW)); return pte; } |
280 | static inline pte_t pte_mkread(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; } | 277 | static inline pte_t pte_mkread(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; } |
281 | static inline pte_t pte_mkexec(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; } | 278 | static inline pte_t pte_mkexec(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_NX)); return pte; } |
282 | static inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; } | 279 | static inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; } |
283 | static inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } | 280 | static inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } |
284 | static inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; } | 281 | static inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; } |
285 | static inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_PSE)); return pte; } | 282 | static inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_PSE)); return pte; } |
283 | static inline pte_t pte_clrhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_PSE)); return pte; } | ||
286 | 284 | ||
287 | struct vm_area_struct; | 285 | struct vm_area_struct; |
288 | 286 | ||