On Tue, 2013-10-15 at 18:27 +0200, leroy christophe wrote:Yes the patch is definitly stable. How should I have mark it ?Le 11/10/2013 17:13, Joakim Tjernlund a Ãcrit :The patch is fine, but I don't think it's stable material (BTW, if it"Linuxppc-dev"Yes we could do a more elaborated modification in the future. However it
<linuxppc-dev-bounces+joakim.tjernlund=transmode.se@xxxxxxxxxxxxxxxx>
wrote on 2013/10/11 14:56:40:
Activating CONFIG_PIN_TLB allows access to the 24 first Mbytes of memoryatbootup instead of 8. It is needed for "big" kernels for instance whenactivatingCONFIG_LOCKDEP_SUPPORT. This needs to be taken into account in init_32too,otherwise memory allocation soon fails after startup.linux-3.11/arch/powerpc/kernel/head_8xx.S
Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxx>
diff -ur linux-3.11.org/arch/powerpc/kernel/head_8xx.S--- linux-3.11.org/arch/powerpc/mm/init_32.c 2013-09-0222: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 @@0x01800000));
*/
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,
+#else0x00800000));
/* 8xx can only access 8MB at the moment */
memblock_set_current_limit(min_t(u64, first_memblock_size,
+#endifhmm, I think you should always map 24 MB (or less if RAM < 24 MB) and do
}
#endif /* CONFIG_8xx */
the same
in head_8xx.S.
Or to keep it simple, just always map at least 16 MB here and in
head_8xx.S, assuming
that 16 MB is min RAM for any 8xx system running 3.x kernels.
also has an impact on the boot loader, so I'm not sure we should make it
the default without thinking twice.
In the meantime, my patch does take into account the existing situation
where you have 8Mb by default and 24Mb when you activate CONFIG_PIN_TLB.
I see it as a bug fix and I believe we should include it at least in
order to allow including in the stable releases.
Do you see any issue with this approach ?
were, you should have marked it as such when submitting). If I
understand the situation correctly, there's no regression, and nothing
fails to work with CONFIG_PIN_TLB that would have worked without it.
It's just making CONFIG_PIN_TLB more useful.
--- Begin Message --- On Tue, 2013-10-15 at 18:27 +0200, leroy christophe wrote:
> Le 11/10/2013 17:13, Joakim Tjernlund a Ãcrit :
> > "Linuxppc-dev"
> > <linuxppc-dev-bounces+joakim.tjernlund=transmode.se@xxxxxxxxxxxxxxxx>
> > wrote on 2013/10/11 14:56:40:
> >> 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@xxxxxx>
> >>
> >> 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 */
> > hmm, I think you should always map 24 MB (or less if RAM < 24 MB) and do
> > the same
> > in head_8xx.S.
> >
> > Or to keep it simple, just always map at least 16 MB here and in
> > head_8xx.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.
>
> In the meantime, my patch does take into account the existing situation
> where you have 8Mb by default and 24Mb when you activate CONFIG_PIN_TLB.
> I see it as a bug fix and I believe we should include it at least in
> order to allow including in the stable releases.
>
> Do you see any issue with this approach ?
The patch is fine, but I don't think it's stable material (BTW, if it
were, you should have marked it as such when submitting). If I
understand the situation correctly, there's no regression, and nothing
fails to work with CONFIG_PIN_TLB that would have worked without it.
It's just making CONFIG_PIN_TLB more useful.
-Scott
--- End Message ---