m68k: 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: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Kirill A. Shutemov
2015-02-10 14:10:41 -08:00
committed by Linus Torvalds
parent 406b16e26d
commit 1eeda0abf4
4 changed files with 2 additions and 53 deletions

View File

@@ -35,7 +35,6 @@
* hitting hardware.
*/
#define CF_PAGE_DIRTY 0x00000001
#define CF_PAGE_FILE 0x00000200
#define CF_PAGE_ACCESSED 0x00001000
#define _PAGE_CACHE040 0x020 /* 68040 cache mode, cachable, copyback */
@@ -243,11 +242,6 @@ static inline int pte_young(pte_t pte)
return pte_val(pte) & CF_PAGE_ACCESSED;
}
static inline int pte_file(pte_t pte)
{
return pte_val(pte) & CF_PAGE_FILE;
}
static inline int pte_special(pte_t pte)
{
return 0;
@@ -391,26 +385,13 @@ static inline void cache_page(void *vaddr)
*ptep = pte_mkcache(*ptep);
}
#define PTE_FILE_MAX_BITS 21
#define PTE_FILE_SHIFT 11
static inline unsigned long pte_to_pgoff(pte_t pte)
{
return pte_val(pte) >> PTE_FILE_SHIFT;
}
static inline pte_t pgoff_to_pte(unsigned pgoff)
{
return __pte((pgoff << PTE_FILE_SHIFT) + CF_PAGE_FILE);
}
/*
* Encode and de-code a swap entry (must be !pte_none(e) && !pte_present(e))
*/
#define __swp_type(x) ((x).val & 0xFF)
#define __swp_offset(x) ((x).val >> PTE_FILE_SHIFT)
#define __swp_offset(x) ((x).val >> 11)
#define __swp_entry(typ, off) ((swp_entry_t) { (typ) | \
(off << PTE_FILE_SHIFT) })
(off << 11) })
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
#define __swp_entry_to_pte(x) (__pte((x).val))