Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

score: drop _PAGE_FILE and pte_file()-related helpers

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>

authored by

Kirill A. Shutemov and committed by
Linus Torvalds
917e401e 6e76d4b2

+2 -17
-1
arch/score/include/asm/pgtable-bits.h
··· 6 6 #define _PAGE_WRITE (1<<7) /* implemented in software */ 7 7 #define _PAGE_PRESENT (1<<9) /* implemented in software */ 8 8 #define _PAGE_MODIFIED (1<<10) /* implemented in software */ 9 - #define _PAGE_FILE (1<<10) 10 9 11 10 #define _PAGE_GLOBAL (1<<0) 12 11 #define _PAGE_VALID (1<<1)
+2 -16
arch/score/include/asm/pgtable.h
··· 90 90 ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address)) 91 91 #define pte_unmap(pte) ((void)(pte)) 92 92 93 - /* 94 - * Bits 9(_PAGE_PRESENT) and 10(_PAGE_FILE)are taken, 95 - * split up 30 bits of offset into this range: 96 - */ 97 - #define PTE_FILE_MAX_BITS 30 98 - #define pte_to_pgoff(_pte) \ 99 - (((_pte).pte & 0x1ff) | (((_pte).pte >> 11) << 9)) 100 - #define pgoff_to_pte(off) \ 101 - ((pte_t) {((off) & 0x1ff) | (((off) >> 9) << 11) | _PAGE_FILE}) 102 93 #define __pte_to_swp_entry(pte) \ 103 94 ((swp_entry_t) { pte_val(pte)}) 104 95 #define __swp_entry_to_pte(x) ((pte_t) {(x).val}) ··· 160 169 } 161 170 162 171 #define __swp_type(x) ((x).val & 0x1f) 163 - #define __swp_offset(x) ((x).val >> 11) 164 - #define __swp_entry(type, offset) ((swp_entry_t){(type) | ((offset) << 11)}) 172 + #define __swp_offset(x) ((x).val >> 10) 173 + #define __swp_entry(type, offset) ((swp_entry_t){(type) | ((offset) << 10)}) 165 174 166 175 extern unsigned long empty_zero_page; 167 176 extern unsigned long zero_page_mask; ··· 187 196 static inline int pte_young(pte_t pte) 188 197 { 189 198 return pte_val(pte) & _PAGE_ACCESSED; 190 - } 191 - 192 - static inline int pte_file(pte_t pte) 193 - { 194 - return pte_val(pte) & _PAGE_FILE; 195 199 } 196 200 197 201 #define pte_special(pte) (0)