From: Paul Mackerras Date: Wed, 26 Oct 2005 11:54:21 +0000 (+1000) Subject: powerpc32: Limit memory to lowmem if !CONFIG_HIGHMEM. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fa39dc437a41733adaba241fd9036760283a516a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git powerpc32: Limit memory to lowmem if !CONFIG_HIGHMEM. This trims off the extra unusable memory from the lmb structure, so we don't try to use it. Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index aa6a5440cec1..8dd1f7d0e23c 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c @@ -154,10 +154,13 @@ void __init MMU_init(void) * in the fixed entries */ adjust_total_lowmem(); #endif /* CONFIG_FSL_BOOKE */ + if (total_lowmem > __max_low_memory) { total_lowmem = __max_low_memory; #ifndef CONFIG_HIGHMEM total_memory = total_lowmem; + lmb_enforce_memory_limit(total_lowmem); + lmb_analyze(); #endif /* CONFIG_HIGHMEM */ }