Patchwork Re[3]: PS3 platform is broken on Linux 3.7.0

login
register
mail settings
Submitter Phileas Fogg
Date Feb. 10, 2013, 12:17 p.m.
Message ID <1360498641.346858866@f116.mail.ru>
Download mbox | patch
Permalink /patch/219491/
State Not Applicable
Headers show

Comments

Phileas Fogg - Feb. 10, 2013, 12:17 p.m.
Please ignore the previous patch to fix the PACA issue on PS3 arch.
This is the correct one:





Воскресенье, 10 февраля 2013, 15:45 +04:00 от Phileas Fogg <phileas-fogg@mail.ru>:
>
>>On Fri, 2012-12-14 at 16:35 +0400, Phileas Fogg wrote:
>>> Hi,
>>> 
>>> I wanted to bring to your attention the fact that the PS3 platform is broken on Linux 3.7.0.
>>> 
>>> i'm not able to boot Linux 3.7.0 on my PS3 slim. Linux 3.6.10 boots just fine but not 3.7.0
>>> When i try to boot Linux 3.7.0 then my PS3  shuts down.
>>> 
>>> So i cloned the Linux powerpc GIT repository and tried to find out which commits broke the PS3 platform.
>>> After some time I tracked it down to 2 commits:
>>
>>Aneesh, do you have any idea what might be going on there ? Can you look
>>at the PS3 hash code ? It's a bit different from the rest, you might
>>have missed an update or two...
>>
>>Michael, same deal with PACA...
>>
>>Cheers,
>>Ben.
>
>
>I debugged the issue with the panic on PACA access on PS3 arch and found out that it panics in
>
>arch/powerpc/kernel/setup_64.c -> early_setup -> udbg_early_init -> register_early_udbg_console -> console_lock -> down -> raw_spin_unlock_irqrestore
>
>It panics only if i enable lock debugging in kernel.
>
>I suggest the following patch to fix the issue:
>
>--- arch/powerpc/kernel/setup_64.c.old	2013-02-10 13:39:45.147131547 +0100
>+++ arch/powerpc/kernel/setup_64.c	2013-02-10 13:40:51.697135419 +0100
>@@ -186,6 +186,9 @@
> 	initialise_paca(&boot_paca, 0);
> 	setup_paca(&boot_paca);

>+	/* Allow percpu accesses to "work" until we setup percpu data */
>+	get_paca()->data_offset = 0;
>+
> 	/* Initialize lockdep early or else spinlocks will blow */
> 	lockdep_init();

>@@ -208,8 +211,6 @@

> 	/* Fix up paca fields required for the boot cpu */
> 	get_paca()->cpu_start = 1;
>-	/* Allow percpu accesses to "work" until we setup percpu data */
>-	get_paca()->data_offset = 0;

> 	/* Probe the machine type */
> 	probe_machine();
>
>
>
>
>_______________________________________________
>Linuxppc-dev mailing list
>Linuxppc-dev@lists.ozlabs.org
>https://lists.ozlabs.org/listinfo/linuxppc-dev
Aneesh Kumar K.V - Feb. 10, 2013, 3:46 p.m.
Phileas Fogg <phileas-fogg@mail.ru> writes:

>  Please ignore the previous patch to fix the PACA issue on PS3 arch.
> This is the correct one:
>
> --- a/arch/powerpc/kernel/setup_64.c	2013-02-10 13:56:12.803855673 +0100
> +++ b/arch/powerpc/kernel/setup_64.c	2013-02-10 14:07:22.870561322 +0100
> @@ -186,6 +186,9 @@
>  	initialise_paca(&boot_paca, 0);
>  	setup_paca(&boot_paca);
>  
> +	/* Allow percpu accesses to "work" until we setup percpu data */
> +	boot_paca.data_offset = 0;
> +
>  	/* Initialize lockdep early or else spinlocks will blow */
>  	lockdep_init();
>  
>

commit 466921c5a4669f4315528a25f9afd66601ce2c04 is done to fix the
lockdep related issue on ppc64. So this may need little bit more
explanation. So if we explicitly use boot_paca, do we still need the
changes in the above commit ?

-aneesh

Patch

--- a/arch/powerpc/kernel/setup_64.c	2013-02-10 13:56:12.803855673 +0100
+++ b/arch/powerpc/kernel/setup_64.c	2013-02-10 14:07:22.870561322 +0100
@@ -186,6 +186,9 @@ 
 	initialise_paca(&boot_paca, 0);
 	setup_paca(&boot_paca);
 
+	/* Allow percpu accesses to "work" until we setup percpu data */
+	boot_paca.data_offset = 0;
+
 	/* Initialize lockdep early or else spinlocks will blow */
 	lockdep_init();