提交 103f3d9a 编写于 作者: K Kirill A. Shutemov 提交者: Linus Torvalds

cris: 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: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 f5b45de9
...@@ -58,7 +58,6 @@ typedef struct ...@@ -58,7 +58,6 @@ typedef struct
/* Bits the HW doesn't care about but the kernel uses them in SW */ /* Bits the HW doesn't care about but the kernel uses them in SW */
#define _PAGE_PRESENT (1<<4) /* page present in memory */ #define _PAGE_PRESENT (1<<4) /* page present in memory */
#define _PAGE_FILE (1<<5) /* set: pagecache, unset: swap (when !PRESENT) */
#define _PAGE_ACCESSED (1<<5) /* simulated in software using valid bit */ #define _PAGE_ACCESSED (1<<5) /* simulated in software using valid bit */
#define _PAGE_MODIFIED (1<<6) /* simulated in software using we bit */ #define _PAGE_MODIFIED (1<<6) /* simulated in software using we bit */
#define _PAGE_READ (1<<7) /* read-enabled */ #define _PAGE_READ (1<<7) /* read-enabled */
...@@ -105,6 +104,4 @@ typedef struct ...@@ -105,6 +104,4 @@ typedef struct
#define __S110 PAGE_SHARED #define __S110 PAGE_SHARED
#define __S111 PAGE_SHARED #define __S111 PAGE_SHARED
#define PTE_FILE_MAX_BITS 26
#endif #endif
...@@ -53,7 +53,6 @@ typedef struct ...@@ -53,7 +53,6 @@ typedef struct
* software. * software.
*/ */
#define _PAGE_PRESENT (1 << 5) /* Page is present in memory. */ #define _PAGE_PRESENT (1 << 5) /* Page is present in memory. */
#define _PAGE_FILE (1 << 6) /* 1=pagecache, 0=swap (when !present) */
#define _PAGE_ACCESSED (1 << 6) /* Simulated in software using valid bit. */ #define _PAGE_ACCESSED (1 << 6) /* Simulated in software using valid bit. */
#define _PAGE_MODIFIED (1 << 7) /* Simulated in software using we bit. */ #define _PAGE_MODIFIED (1 << 7) /* Simulated in software using we bit. */
#define _PAGE_READ (1 << 8) /* Read enabled. */ #define _PAGE_READ (1 << 8) /* Read enabled. */
...@@ -108,6 +107,4 @@ typedef struct ...@@ -108,6 +107,4 @@ typedef struct
#define __S110 PAGE_SHARED_EXEC #define __S110 PAGE_SHARED_EXEC
#define __S111 PAGE_SHARED_EXEC #define __S111 PAGE_SHARED_EXEC
#define PTE_FILE_MAX_BITS 25
#endif /* _ASM_CRIS_ARCH_MMU_H */ #endif /* _ASM_CRIS_ARCH_MMU_H */
...@@ -114,7 +114,6 @@ extern unsigned long empty_zero_page; ...@@ -114,7 +114,6 @@ extern unsigned long empty_zero_page;
static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; }
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_MODIFIED; } static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_MODIFIED; }
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)
...@@ -290,9 +289,6 @@ static inline void update_mmu_cache(struct vm_area_struct * vma, ...@@ -290,9 +289,6 @@ static inline void update_mmu_cache(struct vm_area_struct * vma,
*/ */
#define pgtable_cache_init() do { } while (0) #define pgtable_cache_init() do { } while (0)
#define pte_to_pgoff(x) (pte_val(x) >> 6)
#define pgoff_to_pte(x) __pte(((x) << 6) | _PAGE_FILE)
typedef pte_t *pte_addr_t; typedef pte_t *pte_addr_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册