Commit d9ecee28 authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Linus Torvalds

xtensa: 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: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0a191362
...@@ -89,8 +89,6 @@ ...@@ -89,8 +89,6 @@
* (PAGE_NONE)| PPN | 0 | 00 | ADW | 01 | 11 | 11 | * (PAGE_NONE)| PPN | 0 | 00 | ADW | 01 | 11 | 11 |
* +-----------------------------------------+ * +-----------------------------------------+
* swap | index | type | 01 | 11 | 00 | * swap | index | type | 01 | 11 | 00 |
* +- - - - - - - - - - - - - - - - - - - - -+
* file | file offset | 01 | 11 | 10 |
* +-----------------------------------------+ * +-----------------------------------------+
* *
* For T1050 hardware and earlier the layout differs for present and (PAGE_NONE) * For T1050 hardware and earlier the layout differs for present and (PAGE_NONE)
...@@ -111,7 +109,6 @@ ...@@ -111,7 +109,6 @@
* index swap offset / PAGE_SIZE (bit 11-31: 21 bits -> 8 GB) * index swap offset / PAGE_SIZE (bit 11-31: 21 bits -> 8 GB)
* (note that the index is always non-zero) * (note that the index is always non-zero)
* type swap type (5 bits -> 32 types) * type swap type (5 bits -> 32 types)
* file offset 26-bit offset into the file, in increments of PAGE_SIZE
* *
* Notes: * Notes:
* - (PROT_NONE) is a special case of 'present' but causes an exception for * - (PROT_NONE) is a special case of 'present' but causes an exception for
...@@ -144,7 +141,6 @@ ...@@ -144,7 +141,6 @@
#define _PAGE_HW_VALID 0x00 #define _PAGE_HW_VALID 0x00
#define _PAGE_NONE 0x0f #define _PAGE_NONE 0x0f
#endif #endif
#define _PAGE_FILE (1<<1) /* file mapped page, only if !present */
#define _PAGE_USER (1<<4) /* user access (ring=1) */ #define _PAGE_USER (1<<4) /* user access (ring=1) */
...@@ -260,7 +256,6 @@ static inline void pgtable_cache_init(void) { } ...@@ -260,7 +256,6 @@ static inline void pgtable_cache_init(void) { }
static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITABLE; } static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITABLE; }
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
static inline int pte_special(pte_t pte) { return 0; } static inline int pte_special(pte_t pte) { return 0; }
static inline pte_t pte_wrprotect(pte_t pte) static inline pte_t pte_wrprotect(pte_t pte)
...@@ -390,11 +385,6 @@ ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) ...@@ -390,11 +385,6 @@ ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) #define __swp_entry_to_pte(x) ((pte_t) { (x).val })
#define PTE_FILE_MAX_BITS 26
#define pte_to_pgoff(pte) (pte_val(pte) >> 6)
#define pgoff_to_pte(off) \
((pte_t) { ((off) << 6) | _PAGE_CA_INVALID | _PAGE_FILE | _PAGE_USER })
#endif /* !defined (__ASSEMBLY__) */ #endif /* !defined (__ASSEMBLY__) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment