diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2015-02-10 17:10:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-10 17:30:32 -0500 |
commit | 3ee802ead2de2346dd110e233d14602b2de26b3c (patch) | |
tree | 2c4561d9599db23a09c6288a7a511868d5f5d010 /arch/nios2/include | |
parent | 6bf63a8ccb1dccd6ab81bc8bc46863493629cdb8 (diff) |
nios2: 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: Ley Foon Tan <lftan@altera.com>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/nios2/include')
-rw-r--r-- | arch/nios2/include/asm/pgtable-bits.h | 1 | ||||
-rw-r--r-- | arch/nios2/include/asm/pgtable.h | 10 |
2 files changed, 1 insertions, 10 deletions
diff --git a/arch/nios2/include/asm/pgtable-bits.h b/arch/nios2/include/asm/pgtable-bits.h index ce9e7069aa96..bfddff383e89 100644 --- a/arch/nios2/include/asm/pgtable-bits.h +++ b/arch/nios2/include/asm/pgtable-bits.h | |||
@@ -30,6 +30,5 @@ | |||
30 | #define _PAGE_PRESENT (1<<25) /* PTE contains a translation */ | 30 | #define _PAGE_PRESENT (1<<25) /* PTE contains a translation */ |
31 | #define _PAGE_ACCESSED (1<<26) /* page referenced */ | 31 | #define _PAGE_ACCESSED (1<<26) /* page referenced */ |
32 | #define _PAGE_DIRTY (1<<27) /* dirty page */ | 32 | #define _PAGE_DIRTY (1<<27) /* dirty page */ |
33 | #define _PAGE_FILE (1<<28) /* PTE used for file mapping or swap */ | ||
34 | 33 | ||
35 | #endif /* _ASM_NIOS2_PGTABLE_BITS_H */ | 34 | #endif /* _ASM_NIOS2_PGTABLE_BITS_H */ |
diff --git a/arch/nios2/include/asm/pgtable.h b/arch/nios2/include/asm/pgtable.h index ccbaffd47671..7b292e3a3138 100644 --- a/arch/nios2/include/asm/pgtable.h +++ b/arch/nios2/include/asm/pgtable.h | |||
@@ -112,8 +112,6 @@ static inline int pte_dirty(pte_t pte) \ | |||
112 | { return pte_val(pte) & _PAGE_DIRTY; } | 112 | { return pte_val(pte) & _PAGE_DIRTY; } |
113 | static inline int pte_young(pte_t pte) \ | 113 | static inline int pte_young(pte_t pte) \ |
114 | { return pte_val(pte) & _PAGE_ACCESSED; } | 114 | { return pte_val(pte) & _PAGE_ACCESSED; } |
115 | static inline int pte_file(pte_t pte) \ | ||
116 | { return pte_val(pte) & _PAGE_FILE; } | ||
117 | static inline int pte_special(pte_t pte) { return 0; } | 115 | static inline int pte_special(pte_t pte) { return 0; } |
118 | 116 | ||
119 | #define pgprot_noncached pgprot_noncached | 117 | #define pgprot_noncached pgprot_noncached |
@@ -272,8 +270,7 @@ static inline void pte_clear(struct mm_struct *mm, | |||
272 | __FILE__, __LINE__, pgd_val(e)) | 270 | __FILE__, __LINE__, pgd_val(e)) |
273 | 271 | ||
274 | /* | 272 | /* |
275 | * Encode and decode a swap entry (must be !pte_none(pte) && !pte_present(pte) | 273 | * Encode and decode a swap entry (must be !pte_none(pte) && !pte_present(pte): |
276 | * && !pte_file(pte)): | ||
277 | * | 274 | * |
278 | * 31 30 29 28 27 26 25 24 23 22 21 20 19 18 ... 1 0 | 275 | * 31 30 29 28 27 26 25 24 23 22 21 20 19 18 ... 1 0 |
279 | * 0 0 0 0 type. 0 0 0 0 0 0 offset......... | 276 | * 0 0 0 0 type. 0 0 0 0 0 0 offset......... |
@@ -290,11 +287,6 @@ static inline void pte_clear(struct mm_struct *mm, | |||
290 | #define __swp_entry_to_pte(swp) ((pte_t) { (swp).val }) | 287 | #define __swp_entry_to_pte(swp) ((pte_t) { (swp).val }) |
291 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | 288 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
292 | 289 | ||
293 | /* Encode and decode a nonlinear file mapping entry */ | ||
294 | #define PTE_FILE_MAX_BITS 25 | ||
295 | #define pte_to_pgoff(pte) (pte_val(pte) & 0x1ffffff) | ||
296 | #define pgoff_to_pte(off) __pte(((off) & 0x1ffffff) | _PAGE_FILE) | ||
297 | |||
298 | #define kern_addr_valid(addr) (1) | 290 | #define kern_addr_valid(addr) (1) |
299 | 291 | ||
300 | #include <asm-generic/pgtable.h> | 292 | #include <asm-generic/pgtable.h> |