diff options
Diffstat (limited to 'include/asm-i386/pgtable.h')
-rw-r--r-- | include/asm-i386/pgtable.h | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 628fa7747d0c..c7fefa6b12fd 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -79,7 +79,7 @@ void paging_init(void); | |||
79 | * area for the same reason. ;) | 79 | * area for the same reason. ;) |
80 | */ | 80 | */ |
81 | #define VMALLOC_OFFSET (8*1024*1024) | 81 | #define VMALLOC_OFFSET (8*1024*1024) |
82 | #define VMALLOC_START (((unsigned long) high_memory + vmalloc_earlyreserve + \ | 82 | #define VMALLOC_START (((unsigned long) high_memory + \ |
83 | 2*VMALLOC_OFFSET-1) & ~(VMALLOC_OFFSET-1)) | 83 | 2*VMALLOC_OFFSET-1) & ~(VMALLOC_OFFSET-1)) |
84 | #ifdef CONFIG_HIGHMEM | 84 | #ifdef CONFIG_HIGHMEM |
85 | # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) | 85 | # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) |
@@ -218,8 +218,6 @@ extern unsigned long pg0[]; | |||
218 | * The following only work if pte_present() is true. | 218 | * The following only work if pte_present() is true. |
219 | * Undefined behaviour if not.. | 219 | * Undefined behaviour if not.. |
220 | */ | 220 | */ |
221 | static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; } | ||
222 | static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; } | ||
223 | static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_DIRTY; } | 221 | static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_DIRTY; } |
224 | static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } | 222 | static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } |
225 | static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_RW; } | 223 | static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_RW; } |
@@ -230,13 +228,9 @@ static inline int pte_huge(pte_t pte) { return (pte).pte_low & _PAGE_PSE; } | |||
230 | */ | 228 | */ |
231 | static inline int pte_file(pte_t pte) { return (pte).pte_low & _PAGE_FILE; } | 229 | static inline int pte_file(pte_t pte) { return (pte).pte_low & _PAGE_FILE; } |
232 | 230 | ||
233 | static inline pte_t pte_rdprotect(pte_t pte) { (pte).pte_low &= ~_PAGE_USER; return pte; } | ||
234 | static inline pte_t pte_exprotect(pte_t pte) { (pte).pte_low &= ~_PAGE_USER; return pte; } | ||
235 | static inline pte_t pte_mkclean(pte_t pte) { (pte).pte_low &= ~_PAGE_DIRTY; return pte; } | 231 | static inline pte_t pte_mkclean(pte_t pte) { (pte).pte_low &= ~_PAGE_DIRTY; return pte; } |
236 | static inline pte_t pte_mkold(pte_t pte) { (pte).pte_low &= ~_PAGE_ACCESSED; return pte; } | 232 | static inline pte_t pte_mkold(pte_t pte) { (pte).pte_low &= ~_PAGE_ACCESSED; return pte; } |
237 | static inline pte_t pte_wrprotect(pte_t pte) { (pte).pte_low &= ~_PAGE_RW; return pte; } | 233 | static inline pte_t pte_wrprotect(pte_t pte) { (pte).pte_low &= ~_PAGE_RW; return pte; } |
238 | static inline pte_t pte_mkread(pte_t pte) { (pte).pte_low |= _PAGE_USER; return pte; } | ||
239 | static inline pte_t pte_mkexec(pte_t pte) { (pte).pte_low |= _PAGE_USER; return pte; } | ||
240 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte_low |= _PAGE_DIRTY; return pte; } | 234 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte_low |= _PAGE_DIRTY; return pte; } |
241 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; return pte; } | 235 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; return pte; } |
242 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } | 236 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } |
@@ -295,17 +289,6 @@ static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) | |||
295 | __changed; \ | 289 | __changed; \ |
296 | }) | 290 | }) |
297 | 291 | ||
298 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY | ||
299 | #define ptep_test_and_clear_dirty(vma, addr, ptep) ({ \ | ||
300 | int __ret = 0; \ | ||
301 | if (pte_dirty(*(ptep))) \ | ||
302 | __ret = test_and_clear_bit(_PAGE_BIT_DIRTY, \ | ||
303 | &(ptep)->pte_low); \ | ||
304 | if (__ret) \ | ||
305 | pte_update((vma)->vm_mm, addr, ptep); \ | ||
306 | __ret; \ | ||
307 | }) | ||
308 | |||
309 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 292 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
310 | #define ptep_test_and_clear_young(vma, addr, ptep) ({ \ | 293 | #define ptep_test_and_clear_young(vma, addr, ptep) ({ \ |
311 | int __ret = 0; \ | 294 | int __ret = 0; \ |
@@ -317,27 +300,6 @@ static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) | |||
317 | __ret; \ | 300 | __ret; \ |
318 | }) | 301 | }) |
319 | 302 | ||
320 | /* | ||
321 | * Rules for using ptep_establish: the pte MUST be a user pte, and | ||
322 | * must be a present->present transition. | ||
323 | */ | ||
324 | #define __HAVE_ARCH_PTEP_ESTABLISH | ||
325 | #define ptep_establish(vma, address, ptep, pteval) \ | ||
326 | do { \ | ||
327 | set_pte_present((vma)->vm_mm, address, ptep, pteval); \ | ||
328 | flush_tlb_page(vma, address); \ | ||
329 | } while (0) | ||
330 | |||
331 | #define __HAVE_ARCH_PTEP_CLEAR_DIRTY_FLUSH | ||
332 | #define ptep_clear_flush_dirty(vma, address, ptep) \ | ||
333 | ({ \ | ||
334 | int __dirty; \ | ||
335 | __dirty = ptep_test_and_clear_dirty((vma), (address), (ptep)); \ | ||
336 | if (__dirty) \ | ||
337 | flush_tlb_page(vma, address); \ | ||
338 | __dirty; \ | ||
339 | }) | ||
340 | |||
341 | #define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH | 303 | #define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH |
342 | #define ptep_clear_flush_young(vma, address, ptep) \ | 304 | #define ptep_clear_flush_young(vma, address, ptep) \ |
343 | ({ \ | 305 | ({ \ |