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/sh/include/asm/pgtable_32.h | |
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/sh/include/asm/pgtable_32.h')
-rw-r--r-- | arch/sh/include/asm/pgtable_32.h | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h index 0bce3d81569e..c646e563abce 100644 --- a/arch/sh/include/asm/pgtable_32.h +++ b/arch/sh/include/asm/pgtable_32.h | |||
@@ -26,8 +26,6 @@ | |||
26 | * and timing control which (together with bit 0) are moved into the | 26 | * and timing control which (together with bit 0) are moved into the |
27 | * old-style PTEA on the parts that support it. | 27 | * old-style PTEA on the parts that support it. |
28 | * | 28 | * |
29 | * XXX: Leave the _PAGE_FILE and _PAGE_WT overhaul for a rainy day. | ||
30 | * | ||
31 | * SH-X2 MMUs and extended PTEs | 29 | * SH-X2 MMUs and extended PTEs |
32 | * | 30 | * |
33 | * SH-X2 supports an extended mode TLB with split data arrays due to the | 31 | * SH-X2 supports an extended mode TLB with split data arrays due to the |
@@ -51,7 +49,6 @@ | |||
51 | #define _PAGE_PRESENT 0x100 /* V-bit : page is valid */ | 49 | #define _PAGE_PRESENT 0x100 /* V-bit : page is valid */ |
52 | #define _PAGE_PROTNONE 0x200 /* software: if not present */ | 50 | #define _PAGE_PROTNONE 0x200 /* software: if not present */ |
53 | #define _PAGE_ACCESSED 0x400 /* software: page referenced */ | 51 | #define _PAGE_ACCESSED 0x400 /* software: page referenced */ |
54 | #define _PAGE_FILE _PAGE_WT /* software: pagecache or swap? */ | ||
55 | #define _PAGE_SPECIAL 0x800 /* software: special page */ | 52 | #define _PAGE_SPECIAL 0x800 /* software: special page */ |
56 | 53 | ||
57 | #define _PAGE_SZ_MASK (_PAGE_SZ0 | _PAGE_SZ1) | 54 | #define _PAGE_SZ_MASK (_PAGE_SZ0 | _PAGE_SZ1) |
@@ -105,14 +102,13 @@ static inline unsigned long copy_ptea_attributes(unsigned long x) | |||
105 | /* Mask which drops unused bits from the PTEL value */ | 102 | /* Mask which drops unused bits from the PTEL value */ |
106 | #if defined(CONFIG_CPU_SH3) | 103 | #if defined(CONFIG_CPU_SH3) |
107 | #define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED| \ | 104 | #define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED| \ |
108 | _PAGE_FILE | _PAGE_SZ1 | \ | 105 | _PAGE_SZ1 | _PAGE_HW_SHARED) |
109 | _PAGE_HW_SHARED) | ||
110 | #elif defined(CONFIG_X2TLB) | 106 | #elif defined(CONFIG_X2TLB) |
111 | /* Get rid of the legacy PR/SZ bits when using extended mode */ | 107 | /* Get rid of the legacy PR/SZ bits when using extended mode */ |
112 | #define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED | \ | 108 | #define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED | \ |
113 | _PAGE_FILE | _PAGE_PR_MASK | _PAGE_SZ_MASK) | 109 | _PAGE_PR_MASK | _PAGE_SZ_MASK) |
114 | #else | 110 | #else |
115 | #define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED | _PAGE_FILE) | 111 | #define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED) |
116 | #endif | 112 | #endif |
117 | 113 | ||
118 | #define _PAGE_FLAGS_HARDWARE_MASK (phys_addr_mask() & ~(_PAGE_CLEAR_FLAGS)) | 114 | #define _PAGE_FLAGS_HARDWARE_MASK (phys_addr_mask() & ~(_PAGE_CLEAR_FLAGS)) |
@@ -343,7 +339,6 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
343 | #define pte_not_present(pte) (!((pte).pte_low & _PAGE_PRESENT)) | 339 | #define pte_not_present(pte) (!((pte).pte_low & _PAGE_PRESENT)) |
344 | #define pte_dirty(pte) ((pte).pte_low & _PAGE_DIRTY) | 340 | #define pte_dirty(pte) ((pte).pte_low & _PAGE_DIRTY) |
345 | #define pte_young(pte) ((pte).pte_low & _PAGE_ACCESSED) | 341 | #define pte_young(pte) ((pte).pte_low & _PAGE_ACCESSED) |
346 | #define pte_file(pte) ((pte).pte_low & _PAGE_FILE) | ||
347 | #define pte_special(pte) ((pte).pte_low & _PAGE_SPECIAL) | 342 | #define pte_special(pte) ((pte).pte_low & _PAGE_SPECIAL) |
348 | 343 | ||
349 | #ifdef CONFIG_X2TLB | 344 | #ifdef CONFIG_X2TLB |
@@ -445,7 +440,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
445 | * Encode and de-code a swap entry | 440 | * Encode and de-code a swap entry |
446 | * | 441 | * |
447 | * Constraints: | 442 | * Constraints: |
448 | * _PAGE_FILE at bit 0 | ||
449 | * _PAGE_PRESENT at bit 8 | 443 | * _PAGE_PRESENT at bit 8 |
450 | * _PAGE_PROTNONE at bit 9 | 444 | * _PAGE_PROTNONE at bit 9 |
451 | * | 445 | * |
@@ -453,9 +447,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
453 | * swap offset into bits 10:30. For the 64-bit PTE case, we keep the | 447 | * swap offset into bits 10:30. For the 64-bit PTE case, we keep the |
454 | * preserved bits in the low 32-bits and use the upper 32 as the swap | 448 | * preserved bits in the low 32-bits and use the upper 32 as the swap |
455 | * offset (along with a 5-bit type), following the same approach as x86 | 449 | * offset (along with a 5-bit type), following the same approach as x86 |
456 | * PAE. This keeps the logic quite simple, and allows for a full 32 | 450 | * PAE. This keeps the logic quite simple. |
457 | * PTE_FILE_MAX_BITS, as opposed to the 29-bits we're constrained with | ||
458 | * in the pte_low case. | ||
459 | * | 451 | * |
460 | * As is evident by the Alpha code, if we ever get a 64-bit unsigned | 452 | * As is evident by the Alpha code, if we ever get a 64-bit unsigned |
461 | * long (swp_entry_t) to match up with the 64-bit PTEs, this all becomes | 453 | * long (swp_entry_t) to match up with the 64-bit PTEs, this all becomes |
@@ -471,13 +463,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
471 | #define __pte_to_swp_entry(pte) ((swp_entry_t){ (pte).pte_high }) | 463 | #define __pte_to_swp_entry(pte) ((swp_entry_t){ (pte).pte_high }) |
472 | #define __swp_entry_to_pte(x) ((pte_t){ 0, (x).val }) | 464 | #define __swp_entry_to_pte(x) ((pte_t){ 0, (x).val }) |
473 | 465 | ||
474 | /* | ||
475 | * Encode and decode a nonlinear file mapping entry | ||
476 | */ | ||
477 | #define pte_to_pgoff(pte) ((pte).pte_high) | ||
478 | #define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) }) | ||
479 | |||
480 | #define PTE_FILE_MAX_BITS 32 | ||
481 | #else | 466 | #else |
482 | #define __swp_type(x) ((x).val & 0xff) | 467 | #define __swp_type(x) ((x).val & 0xff) |
483 | #define __swp_offset(x) ((x).val >> 10) | 468 | #define __swp_offset(x) ((x).val >> 10) |
@@ -485,13 +470,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
485 | 470 | ||
486 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 1 }) | 471 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 1 }) |
487 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val << 1 }) | 472 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val << 1 }) |
488 | |||
489 | /* | ||
490 | * Encode and decode a nonlinear file mapping entry | ||
491 | */ | ||
492 | #define PTE_FILE_MAX_BITS 29 | ||
493 | #define pte_to_pgoff(pte) (pte_val(pte) >> 1) | ||
494 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 1) | _PAGE_FILE }) | ||
495 | #endif | 473 | #endif |
496 | 474 | ||
497 | #endif /* __ASSEMBLY__ */ | 475 | #endif /* __ASSEMBLY__ */ |