aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2016-03-15 17:57:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-15 19:55:16 -0400
commit10917b8393521b608f26294b3815261d472f7e9b (patch)
tree61f98200a3c8a86fb76ac32e14f6b2f99b0b2937 /arch/s390/mm
parent288cf3c64e4522d28349de5345348574cbe9df83 (diff)
s390: query dynamic DEBUG_PAGEALLOC setting
We can use debug_pagealloc_enabled() to check if we can map the identity mapping with 1MB/2GB pages as well as to print the current setting in dump_stack. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Acked-by: David Rientjes <rientjes@google.com> Cc: Laura Abbott <labbott@fedoraproject.org> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r--arch/s390/mm/vmem.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index ef7d6c8fea66..d27fccbad7c1 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -94,16 +94,15 @@ static int vmem_add_mem(unsigned long start, unsigned long size, int ro)
94 pgd_populate(&init_mm, pg_dir, pu_dir); 94 pgd_populate(&init_mm, pg_dir, pu_dir);
95 } 95 }
96 pu_dir = pud_offset(pg_dir, address); 96 pu_dir = pud_offset(pg_dir, address);
97#ifndef CONFIG_DEBUG_PAGEALLOC
98 if (MACHINE_HAS_EDAT2 && pud_none(*pu_dir) && address && 97 if (MACHINE_HAS_EDAT2 && pud_none(*pu_dir) && address &&
99 !(address & ~PUD_MASK) && (address + PUD_SIZE <= end)) { 98 !(address & ~PUD_MASK) && (address + PUD_SIZE <= end) &&
99 !debug_pagealloc_enabled()) {
100 pud_val(*pu_dir) = __pa(address) | 100 pud_val(*pu_dir) = __pa(address) |
101 _REGION_ENTRY_TYPE_R3 | _REGION3_ENTRY_LARGE | 101 _REGION_ENTRY_TYPE_R3 | _REGION3_ENTRY_LARGE |
102 (ro ? _REGION_ENTRY_PROTECT : 0); 102 (ro ? _REGION_ENTRY_PROTECT : 0);
103 address += PUD_SIZE; 103 address += PUD_SIZE;
104 continue; 104 continue;
105 } 105 }
106#endif
107 if (pud_none(*pu_dir)) { 106 if (pud_none(*pu_dir)) {
108 pm_dir = vmem_pmd_alloc(); 107 pm_dir = vmem_pmd_alloc();
109 if (!pm_dir) 108 if (!pm_dir)
@@ -111,9 +110,9 @@ static int vmem_add_mem(unsigned long start, unsigned long size, int ro)
111 pud_populate(&init_mm, pu_dir, pm_dir); 110 pud_populate(&init_mm, pu_dir, pm_dir);
112 } 111 }
113 pm_dir = pmd_offset(pu_dir, address); 112 pm_dir = pmd_offset(pu_dir, address);
114#ifndef CONFIG_DEBUG_PAGEALLOC
115 if (MACHINE_HAS_EDAT1 && pmd_none(*pm_dir) && address && 113 if (MACHINE_HAS_EDAT1 && pmd_none(*pm_dir) && address &&
116 !(address & ~PMD_MASK) && (address + PMD_SIZE <= end)) { 114 !(address & ~PMD_MASK) && (address + PMD_SIZE <= end) &&
115 !debug_pagealloc_enabled()) {
117 pmd_val(*pm_dir) = __pa(address) | 116 pmd_val(*pm_dir) = __pa(address) |
118 _SEGMENT_ENTRY | _SEGMENT_ENTRY_LARGE | 117 _SEGMENT_ENTRY | _SEGMENT_ENTRY_LARGE |
119 _SEGMENT_ENTRY_YOUNG | 118 _SEGMENT_ENTRY_YOUNG |
@@ -121,7 +120,6 @@ static int vmem_add_mem(unsigned long start, unsigned long size, int ro)
121 address += PMD_SIZE; 120 address += PMD_SIZE;
122 continue; 121 continue;
123 } 122 }
124#endif
125 if (pmd_none(*pm_dir)) { 123 if (pmd_none(*pm_dir)) {
126 pt_dir = vmem_pte_alloc(address); 124 pt_dir = vmem_pte_alloc(address);
127 if (!pt_dir) 125 if (!pt_dir)