aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 19:45:56 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 19:45:56 -0500
commit992de5a8eca7cbd3215e3eb2c439b2c11582a58b (patch)
tree863988f84c1dd57a02fa337ecbce49263a3b9511 /arch/arm
parentb2718bffb4088faf13092db30c1ebf088ddee52e (diff)
parentd5b3cf7139b8770af4ed8bb36a1ab9d290ac39e9 (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/arm')
-rw-r--r--arch/arm/include/asm/pgtable-2level.h1
-rw-r--r--arch/arm/include/asm/pgtable-3level.h1
-rw-r--r--arch/arm/include/asm/pgtable-nommu.h2
-rw-r--r--arch/arm/include/asm/pgtable.h20
-rw-r--r--arch/arm/mm/proc-macros.S2
5 files changed, 4 insertions, 22 deletions
diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h
index f0279411847d..bcc5e300413f 100644
--- a/arch/arm/include/asm/pgtable-2level.h
+++ b/arch/arm/include/asm/pgtable-2level.h
@@ -118,7 +118,6 @@
118#define L_PTE_VALID (_AT(pteval_t, 1) << 0) /* Valid */ 118#define L_PTE_VALID (_AT(pteval_t, 1) << 0) /* Valid */
119#define L_PTE_PRESENT (_AT(pteval_t, 1) << 0) 119#define L_PTE_PRESENT (_AT(pteval_t, 1) << 0)
120#define L_PTE_YOUNG (_AT(pteval_t, 1) << 1) 120#define L_PTE_YOUNG (_AT(pteval_t, 1) << 1)
121#define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */
122#define L_PTE_DIRTY (_AT(pteval_t, 1) << 6) 121#define L_PTE_DIRTY (_AT(pteval_t, 1) << 6)
123#define L_PTE_RDONLY (_AT(pteval_t, 1) << 7) 122#define L_PTE_RDONLY (_AT(pteval_t, 1) << 7)
124#define L_PTE_USER (_AT(pteval_t, 1) << 8) 123#define L_PTE_USER (_AT(pteval_t, 1) << 8)
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h
index a31ecdad4b59..18dbc82f85e5 100644
--- a/arch/arm/include/asm/pgtable-3level.h
+++ b/arch/arm/include/asm/pgtable-3level.h
@@ -77,7 +77,6 @@
77 */ 77 */
78#define L_PTE_VALID (_AT(pteval_t, 1) << 0) /* Valid */ 78#define L_PTE_VALID (_AT(pteval_t, 1) << 0) /* Valid */
79#define L_PTE_PRESENT (_AT(pteval_t, 3) << 0) /* Present */ 79#define L_PTE_PRESENT (_AT(pteval_t, 3) << 0) /* Present */
80#define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */
81#define L_PTE_USER (_AT(pteval_t, 1) << 6) /* AP[1] */ 80#define L_PTE_USER (_AT(pteval_t, 1) << 6) /* AP[1] */
82#define L_PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ 81#define L_PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */
83#define L_PTE_YOUNG (_AT(pteval_t, 1) << 10) /* AF */ 82#define L_PTE_YOUNG (_AT(pteval_t, 1) << 10) /* AF */
diff --git a/arch/arm/include/asm/pgtable-nommu.h b/arch/arm/include/asm/pgtable-nommu.h
index 0642228ff785..c35e53ee6663 100644
--- a/arch/arm/include/asm/pgtable-nommu.h
+++ b/arch/arm/include/asm/pgtable-nommu.h
@@ -54,8 +54,6 @@
54 54
55typedef pte_t *pte_addr_t; 55typedef pte_t *pte_addr_t;
56 56
57static inline int pte_file(pte_t pte) { return 0; }
58
59/* 57/*
60 * ZERO_PAGE is a global shared page that is always zero: used 58 * ZERO_PAGE is a global shared page that is always zero: used
61 * for zero-mapped memory areas etc.. 59 * for zero-mapped memory areas etc..
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index d5cac545ba33..f40354198bad 100644
--- a/arch/arm/include/asm/pgtable.h
+++ b/arch/arm/include/asm/pgtable.h
@@ -318,12 +318,12 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
318 * 318 *
319 * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 319 * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
320 * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 320 * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
321 * <--------------- offset ----------------------> < type -> 0 0 0 321 * <--------------- offset ------------------------> < type -> 0 0
322 * 322 *
323 * This gives us up to 31 swap files and 64GB per swap file. Note that 323 * This gives us up to 31 swap files and 128GB per swap file. Note that
324 * the offset field is always non-zero. 324 * the offset field is always non-zero.
325 */ 325 */
326#define __SWP_TYPE_SHIFT 3 326#define __SWP_TYPE_SHIFT 2
327#define __SWP_TYPE_BITS 5 327#define __SWP_TYPE_BITS 5
328#define __SWP_TYPE_MASK ((1 << __SWP_TYPE_BITS) - 1) 328#define __SWP_TYPE_MASK ((1 << __SWP_TYPE_BITS) - 1)
329#define __SWP_OFFSET_SHIFT (__SWP_TYPE_BITS + __SWP_TYPE_SHIFT) 329#define __SWP_OFFSET_SHIFT (__SWP_TYPE_BITS + __SWP_TYPE_SHIFT)
@@ -342,20 +342,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
342 */ 342 */
343#define MAX_SWAPFILES_CHECK() BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > __SWP_TYPE_BITS) 343#define MAX_SWAPFILES_CHECK() BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > __SWP_TYPE_BITS)
344 344
345/*
346 * Encode and decode a file entry. File entries are stored in the Linux
347 * page tables as follows:
348 *
349 * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
350 * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
351 * <----------------------- offset ------------------------> 1 0 0
352 */
353#define pte_file(pte) (pte_val(pte) & L_PTE_FILE)
354#define pte_to_pgoff(x) (pte_val(x) >> 3)
355#define pgoff_to_pte(x) __pte(((x) << 3) | L_PTE_FILE)
356
357#define PTE_FILE_MAX_BITS 29
358
359/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ 345/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
360/* FIXME: this is not correct */ 346/* FIXME: this is not correct */
361#define kern_addr_valid(addr) (1) 347#define kern_addr_valid(addr) (1)
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S
index ba1196c968d8..082b9f2f7e90 100644
--- a/arch/arm/mm/proc-macros.S
+++ b/arch/arm/mm/proc-macros.S
@@ -98,7 +98,7 @@
98#endif 98#endif
99#if !defined (CONFIG_ARM_LPAE) && \ 99#if !defined (CONFIG_ARM_LPAE) && \
100 (L_PTE_XN+L_PTE_USER+L_PTE_RDONLY+L_PTE_DIRTY+L_PTE_YOUNG+\ 100 (L_PTE_XN+L_PTE_USER+L_PTE_RDONLY+L_PTE_DIRTY+L_PTE_YOUNG+\
101 L_PTE_FILE+L_PTE_PRESENT) > L_PTE_SHARED 101 L_PTE_PRESENT) > L_PTE_SHARED
102#error Invalid Linux PTE bit settings 102#error Invalid Linux PTE bit settings
103#endif 103#endif
104#endif /* CONFIG_MMU */ 104#endif /* CONFIG_MMU */