aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorLEROY Christophe <christophe.leroy@c-s.fr>2013-10-11 08:56:40 -0400
committerScott Wood <scottwood@freescale.com>2013-10-28 22:11:22 -0400
commit5f2da0f1e8fb074482118f04d0db0614951c3bb8 (patch)
treed695d9d77c607e17f6ddf784fd869f848bad8df4 /arch/powerpc/mm
parent4e591f3c0a618b8230a37bfff64b59e76374f2e5 (diff)
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 <christophe.leroy@c-s.fr> Acked-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/init_32.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index d47d3dab4870..cff59f1bec23 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,
213 */ 213 */
214 BUG_ON(first_memblock_base != 0); 214 BUG_ON(first_memblock_base != 0);
215 215
216#ifdef CONFIG_PIN_TLB
217 /* 8xx can only access 24MB at the moment */
218 memblock_set_current_limit(min_t(u64, first_memblock_size, 0x01800000));
219#else
216 /* 8xx can only access 8MB at the moment */ 220 /* 8xx can only access 8MB at the moment */
217 memblock_set_current_limit(min_t(u64, first_memblock_size, 0x00800000)); 221 memblock_set_current_limit(min_t(u64, first_memblock_size, 0x00800000));
222#endif
218} 223}
219#endif /* CONFIG_8xx */ 224#endif /* CONFIG_8xx */