]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
score: drop _PAGE_FILE and pte_file()-related helpers
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Tue, 10 Feb 2015 22:11:06 +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.

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

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Chen Liqin <liqin.linux@gmail.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/score/include/asm/pgtable-bits.h
arch/score/include/asm/pgtable.h

index 7d65a96a82e56f598cf61e8261d953ebbdbd303f..0e5c6f466520ab7e64ce3e4af6f7eae34e297ccc 100644 (file)
@@ -6,7 +6,6 @@
 #define _PAGE_WRITE                    (1<<7)  /* implemented in software */
 #define _PAGE_PRESENT                  (1<<9)  /* implemented in software */
 #define _PAGE_MODIFIED                 (1<<10) /* implemented in software */
-#define _PAGE_FILE                     (1<<10)
 
 #define _PAGE_GLOBAL                   (1<<0)
 #define _PAGE_VALID                    (1<<1)
index db96ad9afc03ed6c64246887c3257f64c8464f65..5170ffdea64350532105b6964999fb180c3265ed 100644 (file)
@@ -90,15 +90,6 @@ static inline void pmd_clear(pmd_t *pmdp)
        ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address))
 #define pte_unmap(pte) ((void)(pte))
 
-/*
- * Bits 9(_PAGE_PRESENT) and 10(_PAGE_FILE)are taken,
- * split up 30 bits of offset into this range:
- */
-#define PTE_FILE_MAX_BITS      30
-#define pte_to_pgoff(_pte)             \
-       (((_pte).pte & 0x1ff) | (((_pte).pte >> 11) << 9))
-#define pgoff_to_pte(off)              \
-       ((pte_t) {((off) & 0x1ff) | (((off) >> 9) << 11) | _PAGE_FILE})
 #define __pte_to_swp_entry(pte)                \
        ((swp_entry_t) { pte_val(pte)})
 #define __swp_entry_to_pte(x)  ((pte_t) {(x).val})
@@ -169,8 +160,8 @@ static inline pgprot_t pgprot_noncached(pgprot_t _prot)
 }
 
 #define __swp_type(x)          ((x).val & 0x1f)
-#define __swp_offset(x)        ((x).val >> 11)
-#define __swp_entry(type, offset) ((swp_entry_t){(type) | ((offset) << 11)})
+#define __swp_offset(x)        ((x).val >> 10)
+#define __swp_entry(type, offset) ((swp_entry_t){(type) | ((offset) << 10)})
 
 extern unsigned long empty_zero_page;
 extern unsigned long zero_page_mask;
@@ -198,11 +189,6 @@ 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;
-}
-
 #define pte_special(pte)       (0)
 
 static inline pte_t pte_wrprotect(pte_t pte)