diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2015-02-10 17:10:20 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-10 17:30:31 -0500 |
commit | 7a7d2db4b8b3505a3195178619ffcc80985c4be1 (patch) | |
tree | 650dd0479b068d0f96cab327882463f3f3b52421 /arch/avr32 | |
parent | b007ea798f5c568d3f464d37288220ef570f062c (diff) |
avr32: drop _PAGE_FILE and pte_file()-related helpers
We've replaced remap_file_pages(2) implementation with emulation. Nobody
creates non-linear mapping anymore.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/include/asm/pgtable.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/arch/avr32/include/asm/pgtable.h b/arch/avr32/include/asm/pgtable.h index 4beff97e2033..ac7a817e2126 100644 --- a/arch/avr32/include/asm/pgtable.h +++ b/arch/avr32/include/asm/pgtable.h | |||
@@ -86,9 +86,6 @@ extern struct page *empty_zero_page; | |||
86 | #define _PAGE_BIT_PRESENT 10 | 86 | #define _PAGE_BIT_PRESENT 10 |
87 | #define _PAGE_BIT_ACCESSED 11 /* software: page was accessed */ | 87 | #define _PAGE_BIT_ACCESSED 11 /* software: page was accessed */ |
88 | 88 | ||
89 | /* The following flags are only valid when !PRESENT */ | ||
90 | #define _PAGE_BIT_FILE 0 /* software: pagecache or swap? */ | ||
91 | |||
92 | #define _PAGE_WT (1 << _PAGE_BIT_WT) | 89 | #define _PAGE_WT (1 << _PAGE_BIT_WT) |
93 | #define _PAGE_DIRTY (1 << _PAGE_BIT_DIRTY) | 90 | #define _PAGE_DIRTY (1 << _PAGE_BIT_DIRTY) |
94 | #define _PAGE_EXECUTE (1 << _PAGE_BIT_EXECUTE) | 91 | #define _PAGE_EXECUTE (1 << _PAGE_BIT_EXECUTE) |
@@ -101,7 +98,6 @@ extern struct page *empty_zero_page; | |||
101 | /* Software flags */ | 98 | /* Software flags */ |
102 | #define _PAGE_ACCESSED (1 << _PAGE_BIT_ACCESSED) | 99 | #define _PAGE_ACCESSED (1 << _PAGE_BIT_ACCESSED) |
103 | #define _PAGE_PRESENT (1 << _PAGE_BIT_PRESENT) | 100 | #define _PAGE_PRESENT (1 << _PAGE_BIT_PRESENT) |
104 | #define _PAGE_FILE (1 << _PAGE_BIT_FILE) | ||
105 | 101 | ||
106 | /* | 102 | /* |
107 | * Page types, i.e. sizes. _PAGE_TYPE_NONE corresponds to what is | 103 | * Page types, i.e. sizes. _PAGE_TYPE_NONE corresponds to what is |
@@ -210,14 +206,6 @@ static inline int pte_special(pte_t pte) | |||
210 | return 0; | 206 | return 0; |
211 | } | 207 | } |
212 | 208 | ||
213 | /* | ||
214 | * The following only work if pte_present() is not true. | ||
215 | */ | ||
216 | static inline int pte_file(pte_t pte) | ||
217 | { | ||
218 | return pte_val(pte) & _PAGE_FILE; | ||
219 | } | ||
220 | |||
221 | /* Mutator functions for PTE bits */ | 209 | /* Mutator functions for PTE bits */ |
222 | static inline pte_t pte_wrprotect(pte_t pte) | 210 | static inline pte_t pte_wrprotect(pte_t pte) |
223 | { | 211 | { |
@@ -329,7 +317,6 @@ extern void update_mmu_cache(struct vm_area_struct * vma, | |||
329 | * Encode and decode a swap entry | 317 | * Encode and decode a swap entry |
330 | * | 318 | * |
331 | * Constraints: | 319 | * Constraints: |
332 | * _PAGE_FILE at bit 0 | ||
333 | * _PAGE_TYPE_* at bits 2-3 (for emulating _PAGE_PROTNONE) | 320 | * _PAGE_TYPE_* at bits 2-3 (for emulating _PAGE_PROTNONE) |
334 | * _PAGE_PRESENT at bit 10 | 321 | * _PAGE_PRESENT at bit 10 |
335 | * | 322 | * |
@@ -346,18 +333,6 @@ extern void update_mmu_cache(struct vm_area_struct * vma, | |||
346 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | 333 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
347 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | 334 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
348 | 335 | ||
349 | /* | ||
350 | * Encode and decode a nonlinear file mapping entry. We have to | ||
351 | * preserve _PAGE_FILE and _PAGE_PRESENT here. _PAGE_TYPE_* isn't | ||
352 | * necessary, since _PAGE_FILE implies !_PAGE_PROTNONE (?) | ||
353 | */ | ||
354 | #define PTE_FILE_MAX_BITS 30 | ||
355 | #define pte_to_pgoff(pte) (((pte_val(pte) >> 1) & 0x1ff) \ | ||
356 | | ((pte_val(pte) >> 11) << 9)) | ||
357 | #define pgoff_to_pte(off) ((pte_t) { ((((off) & 0x1ff) << 1) \ | ||
358 | | (((off) >> 9) << 11) \ | ||
359 | | _PAGE_FILE) }) | ||
360 | |||
361 | typedef pte_t *pte_addr_t; | 336 | typedef pte_t *pte_addr_t; |
362 | 337 | ||
363 | #define kern_addr_valid(addr) (1) | 338 | #define kern_addr_valid(addr) (1) |