Re: [PATCH] powerpc 8xx: Fixing memory init issue with CONFIG_PIN_TLB
From: Joakim Tjernlund <hidden>
Date: 2013-10-15 16:55:22
Also in:
lkml
leroy christophe [off-list ref] wrote on 2013/10/15 18:27:00:
=20 =20 Le 11/10/2013 17:13, Joakim Tjernlund a =E9crit :quoted
"Linuxppc-dev" [off-list ref] wrote on 2013/10/11 14:56:40:quoted
Activating CONFIG=5FPIN=5FTLB allows access to the 24 first Mbytes of =
memory
quoted
atquoted
bootup instead of 8. It is needed for "big" kernels for instance whenactivatingquoted
CONFIG=5FLOCKDEP=5FSUPPORT. This needs to be taken into account in=20
init=5F32
quoted
too,quoted
otherwise memory allocation soon fails after startup. Signed-off-by: Christophe Leroy <redacted> diff -ur linux-3.11.org/arch/powerpc/kernel/head=5F8xx.Slinux-3.11/arch/powerpc/kernel/head=5F8xx.Squoted
--- linux-3.11.org/arch/powerpc/mm/init=5F32.c 2013-09-0222:46:10.000000000 +0200quoted
+++ linux-3.11/arch/powerpc/mm/init=5F32.c 2013-09-09=20
11:28:54.000000000
quoted
+0200quoted
@@ -213,7 +213,12 @@ */ BUG=5FON(first=5Fmemblock=5Fbase !=3D 0); +#ifdef CONFIG=5FPIN=5FTLB + /* 8xx can only access 24MB at the moment */ + memblock=5Fset=5Fcurrent=5Flimit(min=5Ft(u64, first=5Fmemblock=5Fs=
ize,
quoted
0x01800000));quoted
+#else /* 8xx can only access 8MB at the moment */ memblock=5Fset=5Fcurrent=5Flimit(min=5Ft(u64, first=5Fmemblock=5F=
size,
quoted
0x00800000));quoted
+#endif } #endif /* CONFIG=5F8xx */hmm, I think you should always map 24 MB (or less if RAM < 24 MB) and=20
do
quoted
the same in head=5F8xx.S. Or to keep it simple, just always map at least 16 MB here and in head=5F8xx.S, assuming that 16 MB is min RAM for any 8xx system running 3.x kernels.Yes we could do a more elaborated modification in the future. However it =
also has an impact on the boot loader, so I'm not sure we should make it =
the default without thinking twice. =20 In the meantime, my patch does take into account the existing situation=20 where you have 8Mb by default and 24Mb when you activate CONFIG=5FPIN=5FT=
LB.
I see it as a bug fix and I believe we should include it at least in=20 order to allow including in the stable releases. =20 Do you see any issue with this approach ?
Not at all, so: Acked-by: Joakim Tjernlund <redacted>