diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-10 19:45:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-10 19:45:56 -0500 |
commit | 992de5a8eca7cbd3215e3eb2c439b2c11582a58b (patch) | |
tree | 863988f84c1dd57a02fa337ecbce49263a3b9511 /arch/mn10300 | |
parent | b2718bffb4088faf13092db30c1ebf088ddee52e (diff) | |
parent | d5b3cf7139b8770af4ed8bb36a1ab9d290ac39e9 (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge misc updates from Andrew Morton:
"Bite-sized chunks this time, to avoid the MTA ratelimiting woes.
- fs/notify updates
- ocfs2
- some of MM"
That laconic "some MM" is mainly the removal of remap_file_pages(),
which is a big simplification of the VM, and which gets rid of a *lot*
of random cruft and special cases because we no longer support the
non-linear mappings that it used.
From a user interface perspective, nothing has changed, because the
remap_file_pages() syscall still exists, it's just done by emulating the
old behavior by creating a lot of individual small mappings instead of
one non-linear one.
The emulation is slower than the old "native" non-linear mappings, but
nobody really uses or cares about remap_file_pages(), and simplifying
the VM is a big advantage.
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (78 commits)
memcg: zap memcg_slab_caches and memcg_slab_mutex
memcg: zap memcg_name argument of memcg_create_kmem_cache
memcg: zap __memcg_{charge,uncharge}_slab
mm/page_alloc.c: place zone_id check before VM_BUG_ON_PAGE check
mm: hugetlb: fix type of hugetlb_treat_as_movable variable
mm, hugetlb: remove unnecessary lower bound on sysctl handlers"?
mm: memory: merge shared-writable dirtying branches in do_wp_page()
mm: memory: remove ->vm_file check on shared writable vmas
xtensa: drop _PAGE_FILE and pte_file()-related helpers
x86: drop _PAGE_FILE and pte_file()-related helpers
unicore32: drop pte_file()-related helpers
um: drop _PAGE_FILE and pte_file()-related helpers
tile: drop pte_file()-related helpers
sparc: drop pte_file()-related helpers
sh: drop _PAGE_FILE and pte_file()-related helpers
score: drop _PAGE_FILE and pte_file()-related helpers
s390: drop pte_file()-related helpers
parisc: drop _PAGE_FILE and pte_file()-related helpers
openrisc: drop _PAGE_FILE and pte_file()-related helpers
nios2: drop _PAGE_FILE and pte_file()-related helpers
...
Diffstat (limited to 'arch/mn10300')
-rw-r--r-- | arch/mn10300/include/asm/pgtable.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/mn10300/include/asm/pgtable.h b/arch/mn10300/include/asm/pgtable.h index 2ddaa67e7983..629181ae111e 100644 --- a/arch/mn10300/include/asm/pgtable.h +++ b/arch/mn10300/include/asm/pgtable.h | |||
@@ -134,7 +134,6 @@ extern pte_t kernel_vmalloc_ptes[(VMALLOC_END - VMALLOC_START) / PAGE_SIZE]; | |||
134 | #define _PAGE_NX 0 /* no-execute bit */ | 134 | #define _PAGE_NX 0 /* no-execute bit */ |
135 | 135 | ||
136 | /* If _PAGE_VALID is clear, we use these: */ | 136 | /* If _PAGE_VALID is clear, we use these: */ |
137 | #define _PAGE_FILE xPTEL2_C /* set:pagecache unset:swap */ | ||
138 | #define _PAGE_PROTNONE 0x000 /* If not present */ | 137 | #define _PAGE_PROTNONE 0x000 /* If not present */ |
139 | 138 | ||
140 | #define __PAGE_PROT_UWAUX 0x010 | 139 | #define __PAGE_PROT_UWAUX 0x010 |
@@ -241,11 +240,6 @@ static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | |||
241 | static inline int pte_write(pte_t pte) { return pte_val(pte) & __PAGE_PROT_WRITE; } | 240 | static inline int pte_write(pte_t pte) { return pte_val(pte) & __PAGE_PROT_WRITE; } |
242 | static inline int pte_special(pte_t pte){ return 0; } | 241 | static inline int pte_special(pte_t pte){ return 0; } |
243 | 242 | ||
244 | /* | ||
245 | * The following only works if pte_present() is not true. | ||
246 | */ | ||
247 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | ||
248 | |||
249 | static inline pte_t pte_rdprotect(pte_t pte) | 243 | static inline pte_t pte_rdprotect(pte_t pte) |
250 | { | 244 | { |
251 | pte_val(pte) &= ~(__PAGE_PROT_USER|__PAGE_PROT_UWAUX); return pte; | 245 | pte_val(pte) &= ~(__PAGE_PROT_USER|__PAGE_PROT_UWAUX); return pte; |
@@ -338,16 +332,11 @@ static inline int pte_exec_kernel(pte_t pte) | |||
338 | return 1; | 332 | return 1; |
339 | } | 333 | } |
340 | 334 | ||
341 | #define PTE_FILE_MAX_BITS 30 | ||
342 | |||
343 | #define pte_to_pgoff(pte) (pte_val(pte) >> 2) | ||
344 | #define pgoff_to_pte(off) __pte((off) << 2 | _PAGE_FILE) | ||
345 | |||
346 | /* Encode and de-code a swap entry */ | 335 | /* Encode and de-code a swap entry */ |
347 | #define __swp_type(x) (((x).val >> 2) & 0x3f) | 336 | #define __swp_type(x) (((x).val >> 1) & 0x3f) |
348 | #define __swp_offset(x) ((x).val >> 8) | 337 | #define __swp_offset(x) ((x).val >> 7) |
349 | #define __swp_entry(type, offset) \ | 338 | #define __swp_entry(type, offset) \ |
350 | ((swp_entry_t) { ((type) << 2) | ((offset) << 8) }) | 339 | ((swp_entry_t) { ((type) << 1) | ((offset) << 7) }) |
351 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | 340 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
352 | #define __swp_entry_to_pte(x) __pte((x).val) | 341 | #define __swp_entry_to_pte(x) __pte((x).val) |
353 | 342 | ||