um: drop _PAGE_FILE and pte_file()-related helpers
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Tue, 10 Feb 2015 22:11:17 +0000 (14:11 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Feb 2015 22:30:33 +0000 (14:30 -0800)
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: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/include/asm/pgtable-2level.h
arch/um/include/asm/pgtable-3level.h
arch/um/include/asm/pgtable.h

index f534b73e753e74c7515dc5bb96e68ce444546be7..7afe86035fa768a36417a02dbb9a2a76518e4f94 100644 (file)
@@ -41,13 +41,4 @@ static inline void pgd_mkuptodate(pgd_t pgd) { }
 #define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot))
 #define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot))
 
-/*
- * Bits 0 through 4 are taken
- */
-#define PTE_FILE_MAX_BITS      27
-
-#define pte_to_pgoff(pte) (pte_val(pte) >> 5)
-
-#define pgoff_to_pte(off) ((pte_t) { ((off) << 5) + _PAGE_FILE })
-
 #endif
index 0032f9212e74a2b8b4722427611a29aeb5cd62c7..344c559c0a1787dbab65ddcd5c66f6337ab4f6b6 100644 (file)
@@ -112,25 +112,5 @@ static inline pmd_t pfn_pmd(pfn_t page_nr, pgprot_t pgprot)
        return __pmd((page_nr << PAGE_SHIFT) | pgprot_val(pgprot));
 }
 
-/*
- * Bits 0 through 3 are taken in the low part of the pte,
- * put the 32 bits of offset into the high part.
- */
-#define PTE_FILE_MAX_BITS      32
-
-#ifdef CONFIG_64BIT
-
-#define pte_to_pgoff(p) ((p).pte >> 32)
-
-#define pgoff_to_pte(off) ((pte_t) { ((off) << 32) | _PAGE_FILE })
-
-#else
-
-#define pte_to_pgoff(pte) ((pte).pte_high)
-
-#define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) })
-
-#endif
-
 #endif
 
index bf974f712af7e9929fb6ee4908eda145b1fe1a14..2324b624f1957754eb337cfd1b06d90f74f1b60c 100644 (file)
@@ -18,7 +18,6 @@
 #define _PAGE_ACCESSED 0x080
 #define _PAGE_DIRTY    0x100
 /* If _PAGE_PRESENT is clear, we use these: */
-#define _PAGE_FILE     0x008   /* nonlinear file mapping, saved PTE; unset:swap */
 #define _PAGE_PROTNONE 0x010   /* if the user mapped it with PROT_NONE;
                                   pte_present gives true */
 
@@ -151,14 +150,6 @@ static inline int pte_write(pte_t pte)
               !(pte_get_bits(pte, _PAGE_PROTNONE)));
 }
 
-/*
- * The following only works if pte_present() is not true.
- */
-static inline int pte_file(pte_t pte)
-{
-       return pte_get_bits(pte, _PAGE_FILE);
-}
-
 static inline int pte_dirty(pte_t pte)
 {
        return pte_get_bits(pte, _PAGE_DIRTY);