linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc 8xx: Fixing memory init issue with CONFIG_PIN_TLB
@ 2013-10-11 12:56 Christophe Leroy
  2013-10-11 15:13 ` Joakim Tjernlund
  0 siblings, 1 reply; 7+ messages in thread
From: Christophe Leroy @ 2013-10-11 12:56 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras; +Cc: linuxppc-dev, linux-kernel

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>

diff -ur linux-3.11.org/arch/powerpc/kernel/head_8xx.S linux-3.11/arch/powerpc/kernel/head_8xx.S
--- linux-3.11.org/arch/powerpc/mm/init_32.c	2013-09-02 22:46:10.000000000 +0200
+++ linux-3.11/arch/powerpc/mm/init_32.c	2013-09-09 11:28:54.000000000 +0200
@@ -213,7 +213,12 @@
 	 */
 	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 */

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-10-16 19:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11 12:56 [PATCH] powerpc 8xx: Fixing memory init issue with CONFIG_PIN_TLB Christophe Leroy
2013-10-11 15:13 ` Joakim Tjernlund
2013-10-15 16:27   ` leroy christophe
2013-10-15 16:55     ` Joakim Tjernlund
2013-10-15 20:33     ` Scott Wood
2013-10-16  5:45       ` leroy christophe
2013-10-16 19:40         ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).