From: LEROY Christophe Date: Fri, 11 Oct 2013 12:56:40 +0000 (+0200) Subject: powerpc/8xx: Fixing memory init issue with CONFIG_PIN_TLB X-Git-Tag: v3.13-rc1~20^2~54^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f2da0f1e8fb074482118f04d0db0614951c3bb8;p=kernel%2Fkernel-generic.git powerpc/8xx: Fixing memory init issue with CONFIG_PIN_TLB Activating CONFIG_PIN_TLB allows access to the 24 first Mbytes of memory at bootup instead of 8. It is needed for "big" kernels for instance when activating CONFIG_LOCKDEP_SUPPORT. This needs to be taken into account in init_32 too, otherwise memory allocation soon fails after startup. Signed-off-by: Christophe Leroy Acked-by: Joakim Tjernlund Signed-off-by: Scott Wood --- diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index d47d3da..cff59f1 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c @@ -213,7 +213,12 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base, */ BUG_ON(first_memblock_base != 0); +#ifdef CONFIG_PIN_TLB + /* 8xx can only access 24MB at the moment */ + memblock_set_current_limit(min_t(u64, first_memblock_size, 0x01800000)); +#else /* 8xx can only access 8MB at the moment */ memblock_set_current_limit(min_t(u64, first_memblock_size, 0x00800000)); +#endif } #endif /* CONFIG_8xx */