Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 648609e3 authored by Gerald Schaefer's avatar Gerald Schaefer Committed by Martin Schwidefsky
Browse files

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: default avatarGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 535c611d
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -267,12 +267,10 @@ static noinline __init void setup_facility_list(void)


static noinline __init void setup_hpage(void)
static noinline __init void setup_hpage(void)
{
{
#ifndef CONFIG_DEBUG_PAGEALLOC
	if (!test_facility(2) || !test_facility(8))
	if (!test_facility(2) || !test_facility(8))
		return;
		return;
	S390_lowcore.machine_flags |= MACHINE_FLAG_HPAGE;
	S390_lowcore.machine_flags |= MACHINE_FLAG_HPAGE;
	__ctl_set_bit(0, 23);
	__ctl_set_bit(0, 23);
#endif
}
}


static __init void detect_mvpg(void)
static __init void detect_mvpg(void)
+1 −1
Original line number Original line Diff line number Diff line
@@ -107,7 +107,7 @@ static int vmem_add_mem(unsigned long start, unsigned long size, int ro)
		pte = mk_pte_phys(address, __pgprot(ro ? _PAGE_RO : 0));
		pte = mk_pte_phys(address, __pgprot(ro ? _PAGE_RO : 0));
		pm_dir = pmd_offset(pu_dir, address);
		pm_dir = pmd_offset(pu_dir, address);


#ifdef CONFIG_64BIT
#if defined(CONFIG_64BIT) && !defined(CONFIG_DEBUG_PAGEALLOC)
		if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) &&
		if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) &&
		    (address + HPAGE_SIZE <= start + size) &&
		    (address + HPAGE_SIZE <= start + size) &&
		    (address >= HPAGE_SIZE)) {
		    (address >= HPAGE_SIZE)) {