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>
This commit is contained in:
Родитель
b007ea798f
Коммит
7a7d2db4b8
|
@ -86,9 +86,6 @@ extern struct page *empty_zero_page;
|
|||
#define _PAGE_BIT_PRESENT 10
|
||||
#define _PAGE_BIT_ACCESSED 11 /* software: page was accessed */
|
||||
|
||||
/* The following flags are only valid when !PRESENT */
|
||||
#define _PAGE_BIT_FILE 0 /* software: pagecache or swap? */
|
||||
|
||||
#define _PAGE_WT (1 << _PAGE_BIT_WT)
|
||||
#define _PAGE_DIRTY (1 << _PAGE_BIT_DIRTY)
|
||||
#define _PAGE_EXECUTE (1 << _PAGE_BIT_EXECUTE)
|
||||
|
@ -101,7 +98,6 @@ extern struct page *empty_zero_page;
|
|||
/* Software flags */
|
||||
#define _PAGE_ACCESSED (1 << _PAGE_BIT_ACCESSED)
|
||||
#define _PAGE_PRESENT (1 << _PAGE_BIT_PRESENT)
|
||||
#define _PAGE_FILE (1 << _PAGE_BIT_FILE)
|
||||
|
||||
/*
|
||||
* Page types, i.e. sizes. _PAGE_TYPE_NONE corresponds to what is
|
||||
|
@ -210,14 +206,6 @@ static inline int pte_special(pte_t pte)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* The following only work if pte_present() is not true.
|
||||
*/
|
||||
static inline int pte_file(pte_t pte)
|
||||
{
|
||||
return pte_val(pte) & _PAGE_FILE;
|
||||
}
|
||||
|
||||
/* Mutator functions for PTE bits */
|
||||
static inline pte_t pte_wrprotect(pte_t pte)
|
||||
{
|
||||
|
@ -329,7 +317,6 @@ extern void update_mmu_cache(struct vm_area_struct * vma,
|
|||
* Encode and decode a swap entry
|
||||
*
|
||||
* Constraints:
|
||||
* _PAGE_FILE at bit 0
|
||||
* _PAGE_TYPE_* at bits 2-3 (for emulating _PAGE_PROTNONE)
|
||||
* _PAGE_PRESENT at bit 10
|
||||
*
|
||||
|
@ -346,18 +333,6 @@ extern void update_mmu_cache(struct vm_area_struct * vma,
|
|||
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
|
||||
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
|
||||
|
||||
/*
|
||||
* Encode and decode a nonlinear file mapping entry. We have to
|
||||
* preserve _PAGE_FILE and _PAGE_PRESENT here. _PAGE_TYPE_* isn't
|
||||
* necessary, since _PAGE_FILE implies !_PAGE_PROTNONE (?)
|
||||
*/
|
||||
#define PTE_FILE_MAX_BITS 30
|
||||
#define pte_to_pgoff(pte) (((pte_val(pte) >> 1) & 0x1ff) \
|
||||
| ((pte_val(pte) >> 11) << 9))
|
||||
#define pgoff_to_pte(off) ((pte_t) { ((((off) & 0x1ff) << 1) \
|
||||
| (((off) >> 9) << 11) \
|
||||
| _PAGE_FILE) })
|
||||
|
||||
typedef pte_t *pte_addr_t;
|
||||
|
||||
#define kern_addr_valid(addr) (1)
|
||||
|
|
Загрузка…
Ссылка в новой задаче