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

login
register
mail settings
Submitter Phileas Fogg
Date Feb. 10, 2013, 5:51 p.m.
Message ID <1360518697.255951128@f337.mail.ru>
Download mbox | patch
Permalink /patch/219528/
State Not Applicable
Headers show

Comments

Phileas Fogg - Feb. 10, 2013, 5:51 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
>
>_______________________________________________
>Linuxppc-dev mailing list
>Linuxppc-dev@lists.ozlabs.org
>https://lists.ozlabs.org/listinfo/linuxppc-dev

Ok, here is the next PACA fix test.

I tested the following patch with Linux 3.8.0-rc7 on PS3 arch and still getting panics.

Patch:




It seems that 'boot_paca' and 'get_paca()' refer to different PACAs.

regards
Michael Ellerman - Feb. 11, 2013, 3:39 a.m.
On Sun, Feb 10, 2013 at 09:51:37PM +0400, Phileas Fogg wrote:
> 
> >Phileas Fogg < phileas-fogg@mail.ru > writes:
> >
> 
> Patch:
> 
> --- arch/powerpc/kernel/setup_64.c.old    2013-02-10 19:34:53.787366191 +0100
> +++ arch/powerpc/kernel/setup_64.c    2013-02-10 19:35:38.834035478 +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;
> +

This is correct.

>      /* 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;

But this is not.

As you said, they are different pacas, so we need to make sure both
boot_paca, and "the paca of the boot cpu" are initialised with
data_offset = 0.

I'll send a patch to sort it.

cheers

Patch

--- arch/powerpc/kernel/setup_64.c.old    2013-02-10 19:34:53.787366191 +0100
+++ arch/powerpc/kernel/setup_64.c    2013-02-10 19:35:38.834035478 +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();
 
@@ -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();