aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Schaefer <gerald.schaefer@de.ibm.com>2012-08-21 06:36:34 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-09-26 09:44:50 -0400
commit648609e3f24599a5ad8d53df2ec13fbc37810bcc (patch)
treebd8a7694f53ab33a8c85cf52313905fa4f59454e
parent535c611ddd3eb076f96579131e30bc5dd02a3b1c (diff)
s390: enable large page support with CONFIG_DEBUG_PAGEALLOC
So far, large page support was completely disabled with CONFIG_DEBUG_PAGEALLOC, although it would be sufficient if only the large page kernel mapping was disabled. This patch enables large page support with CONFIG_DEBUG_PAGEALLOC, while it prevents the large kernel mapping in that case. Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/early.c2
-rw-r--r--arch/s390/mm/vmem.c2
2 files changed, 1 insertions, 3 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 83c3271c442b..e48407962b0f 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -267,12 +267,10 @@ static noinline __init void setup_facility_list(void)
267 267
268static noinline __init void setup_hpage(void) 268static noinline __init void setup_hpage(void)
269{ 269{
270#ifndef CONFIG_DEBUG_PAGEALLOC
271 if (!test_facility(2) || !test_facility(8)) 270 if (!test_facility(2) || !test_facility(8))
272 return; 271 return;
273 S390_lowcore.machine_flags |= MACHINE_FLAG_HPAGE; 272 S390_lowcore.machine_flags |= MACHINE_FLAG_HPAGE;
274 __ctl_set_bit(0, 23); 273 __ctl_set_bit(0, 23);
275#endif
276} 274}
277 275
278static __init void detect_mvpg(void) 276static __init void detect_mvpg(void)
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 6f896e75ab49..c22abf900c9e 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -107,7 +107,7 @@ static int vmem_add_mem(unsigned long start, unsigned long size, int ro)
107 pte = mk_pte_phys(address, __pgprot(ro ? _PAGE_RO : 0)); 107 pte = mk_pte_phys(address, __pgprot(ro ? _PAGE_RO : 0));
108 pm_dir = pmd_offset(pu_dir, address); 108 pm_dir = pmd_offset(pu_dir, address);
109 109
110#ifdef CONFIG_64BIT 110#if defined(CONFIG_64BIT) && !defined(CONFIG_DEBUG_PAGEALLOC)
111 if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) && 111 if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) &&
112 (address + HPAGE_SIZE <= start + size) && 112 (address + HPAGE_SIZE <= start + size) &&
113 (address >= HPAGE_SIZE)) { 113 (address >= HPAGE_SIZE)) {