]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
frv: drop _PAGE_FILE and pte_file()-related helpers
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Tue, 10 Feb 2015 22:10:31 +0000 (14:10 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Feb 2015 22:30:32 +0000 (14:30 -0800)
We've replaced remap_file_pages(2) implementation with emulation.  Nobody
creates non-linear mapping anymore.

This patch also increase number of bits availble for swap offset.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/frv/include/asm/pgtable.h

index eb0110acd19b72331c040fd5f9e510ce60c2109e..c49699d5902d21abeb892c93ed11ea39f9828a58 100644 (file)
@@ -62,10 +62,6 @@ typedef pte_t *pte_addr_t;
 #define __pte_to_swp_entry(pte)        ((swp_entry_t) { pte_val(pte) })
 #define __swp_entry_to_pte(x)  ((pte_t) { (x).val })
 
-#ifndef __ASSEMBLY__
-static inline int pte_file(pte_t pte) { return 0; }
-#endif
-
 #define ZERO_PAGE(vaddr)       ({ BUG(); NULL; })
 
 #define swapper_pg_dir         ((pgd_t *) NULL)
@@ -298,7 +294,6 @@ static inline pmd_t *pmd_offset(pud_t *dir, unsigned long address)
 
 #define _PAGE_RESERVED_MASK    (xAMPRx_RESERVED8 | xAMPRx_RESERVED13)
 
-#define _PAGE_FILE             0x002   /* set:pagecache unset:swap */
 #define _PAGE_PROTNONE         0x000   /* If not present */
 
 #define _PAGE_CHG_MASK         (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
@@ -463,27 +458,15 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
  * Handle swap and file entries
  * - the PTE is encoded in the following format:
  *     bit 0:          Must be 0 (!_PAGE_PRESENT)
- *     bit 1:          Type: 0 for swap, 1 for file (_PAGE_FILE)
- *     bits 2-7:       Swap type
- *     bits 8-31:      Swap offset
- *     bits 2-31:      File pgoff
+ *     bits 1-6:       Swap type
+ *     bits 7-31:      Swap offset
  */
-#define __swp_type(x)                  (((x).val >> 2) & 0x1f)
-#define __swp_offset(x)                        ((x).val >> 8)
-#define __swp_entry(type, offset)      ((swp_entry_t) { ((type) << 2) | ((offset) << 8) })
+#define __swp_type(x)                  (((x).val >> 1) & 0x1f)
+#define __swp_offset(x)                        ((x).val >> 7)
+#define __swp_entry(type, offset)      ((swp_entry_t) { ((type) << 1) | ((offset) << 7) })
 #define __pte_to_swp_entry(_pte)       ((swp_entry_t) { (_pte).pte })
 #define __swp_entry_to_pte(x)          ((pte_t) { (x).val })
 
-static inline int pte_file(pte_t pte)
-{
-       return pte.pte & _PAGE_FILE;
-}
-
-#define PTE_FILE_MAX_BITS      29
-
-#define pte_to_pgoff(PTE)      ((PTE).pte >> 2)
-#define pgoff_to_pte(off)      __pte((off) << 2 | _PAGE_FILE)
-
 /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
 #define PageSkip(page)         (0)
 #define kern_addr_valid(addr)  (1)