* PS3 platform is broken on Linux 3.7.0
@ 2012-12-14 12:35 Phileas Fogg
2012-12-19 21:53 ` Benjamin Herrenschmidt
2013-02-13 7:32 ` Geoff Levand
0 siblings, 2 replies; 18+ messages in thread
From: Phileas Fogg @ 2012-12-14 12:35 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 2304 bytes --]
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:
---------------------------------------------------------------------------------------------
commit 407821a34fce89b4f0b031dbab5cec7d059f46bc
Author: Michael Ellerman <michael@ellerman.id.au>
Date: Fri Sep 7 15:31:44 2012 +0000
powerpc: Initialise paca.data_offset with poison
It's possible for the cpu_possible_mask to change between the time we
initialise the pacas and the time we setup per_cpu areas.
Obviously impossible cpus shouldn't ever be running, but stranger things
have happened. So be paranoid and initialise data_offset with a poison
value in case we don't set it up later.
Based on a patch from Anton Blanchard.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
------------------------------------------------------------------------------------------------
commit 048ee0993ec8360abb0b51bdf8f8721e9ed62ec4
Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Date: Mon Sep 10 02:52:55 2012 +0000
powerpc/mm: Add 64TB support
Increase max addressable range to 64TB. This is not tested on
real hardware yet.
Reviewed-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
----------------------------------------------------------------------------------------------------------
The first commit causes my PS3 to shut down. If i revert it then i'm able to boot Linux 3.7.0 and even see some boot messages
on my screen. But then it hangs. The second commit is the reason for the hang as i figured it out.
I reverted both commits in current Linux 3.7.0 and was able to boot Linux 3.7.0 on my PS3 slim successfully.
Regards
[-- Attachment #2: Type: text/html, Size: 2829 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: PS3 platform is broken on Linux 3.7.0
2012-12-14 12:35 PS3 platform is broken on Linux 3.7.0 Phileas Fogg
@ 2012-12-19 21:53 ` Benjamin Herrenschmidt
2013-01-12 2:12 ` Geoff Levand
2013-02-10 11:45 ` Phileas Fogg
2013-02-13 7:32 ` Geoff Levand
1 sibling, 2 replies; 18+ messages in thread
From: Benjamin Herrenschmidt @ 2012-12-19 21:53 UTC (permalink / raw)
To: Phileas Fogg; +Cc: linuxppc-dev, Aneesh Kumar K.V
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.
> ---------------------------------------------------------------------------------------------
>
> commit 407821a34fce89b4f0b031dbab5cec7d059f46bc
> Author: Michael Ellerman <michael@ellerman.id.au>
> Date: Fri Sep 7 15:31:44 2012 +0000
>
> powerpc: Initialise paca.data_offset with poison
>
> It's possible for the cpu_possible_mask to change between the time we
> initialise the pacas and the time we setup per_cpu areas.
>
> Obviously impossible cpus shouldn't ever be running, but stranger things
> have happened. So be paranoid and initialise data_offset with a poison
> value in case we don't set it up later.
>
> Based on a patch from Anton Blanchard.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
>
> ------------------------------------------------------------------------------------------------
>
> commit 048ee0993ec8360abb0b51bdf8f8721e9ed62ec4
> Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> Date: Mon Sep 10 02:52:55 2012 +0000
>
> powerpc/mm: Add 64TB support
>
> Increase max addressable range to 64TB. This is not tested on
> real hardware yet.
>
> Reviewed-by: Paul Mackerras <paulus@samba.org>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> ----------------------------------------------------------------------------------------------------------
>
> The first commit causes my PS3 to shut down. If i revert it then i'm able to boot Linux 3.7.0 and even see some boot messages
> on my screen. But then it hangs. The second commit is the reason for the hang as i figured it out.
>
> I reverted both commits in current Linux 3.7.0 and was able to boot Linux 3.7.0 on my PS3 slim successfully.
>
> Regards
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: PS3 platform is broken on Linux 3.7.0
2012-12-19 21:53 ` Benjamin Herrenschmidt
@ 2013-01-12 2:12 ` Geoff Levand
2013-01-14 23:37 ` Geoff Levand
2013-02-10 11:45 ` Phileas Fogg
1 sibling, 1 reply; 18+ messages in thread
From: Geoff Levand @ 2013-01-12 2:12 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Michael Ellerman, Aneesh Kumar K.V
Cc: Phileas Fogg, linuxppc-dev
Hi,
On Thu, 2012-12-20 at 08:53 +1100, Benjamin Herrenschmidt wrote:
> 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...
I checked these, and Michael's 407821a34fce89b4f0b031dbab5cec7d059f46bc
does indeed cause the LV1 hypervisor to panic early, and if that is
reverted, Aneesh's 048ee0993ec8360abb0b51bdf8f8721e9ed62ec4 hits a BUG.
I'll look at it some more next week.
-Geoff
> > ---------------------------------------------------------------------------------------------
> >
> > commit 407821a34fce89b4f0b031dbab5cec7d059f46bc
> > Author: Michael Ellerman <michael@ellerman.id.au>
> > Date: Fri Sep 7 15:31:44 2012 +0000
> >
> > powerpc: Initialise paca.data_offset with poison
> >
> > It's possible for the cpu_possible_mask to change between the time we
> > initialise the pacas and the time we setup per_cpu areas.
> >
> > Obviously impossible cpus shouldn't ever be running, but stranger things
> > have happened. So be paranoid and initialise data_offset with a poison
> > value in case we don't set it up later.
> >
> > Based on a patch from Anton Blanchard.
> >
> > Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> >
> >
> > ------------------------------------------------------------------------------------------------
> >
> > commit 048ee0993ec8360abb0b51bdf8f8721e9ed62ec4
> > Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> > Date: Mon Sep 10 02:52:55 2012 +0000
> >
> > powerpc/mm: Add 64TB support
> >
> > Increase max addressable range to 64TB. This is not tested on
> > real hardware yet.
> >
> > Reviewed-by: Paul Mackerras <paulus@samba.org>
> > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> >
> > ----------------------------------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: PS3 platform is broken on Linux 3.7.0
2013-01-12 2:12 ` Geoff Levand
@ 2013-01-14 23:37 ` Geoff Levand
2013-02-10 8:59 ` Re[2]: " Phileas Fogg
0 siblings, 1 reply; 18+ messages in thread
From: Geoff Levand @ 2013-01-14 23:37 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Phileas Fogg, linuxppc-dev, Aneesh Kumar K.V
Hi,
On Fri, 2013-01-11 at 18:12 -0800, Geoff Levand wrote:
> I checked these, and Michael's 407821a34fce89b4f0b031dbab5cec7d059f46bc
> does indeed cause the LV1 hypervisor to panic early, and if that is
> reverted, Aneesh's 048ee0993ec8360abb0b51bdf8f8721e9ed62ec4 hits a BUG.
Just to give an update, I did a little more work on it and found that
the call to lv1_insert_htab_entry() inside ps3_hpte_insert() is
failing.
http://git.kernel.org/?p=linux/kernel/git/geoff/ps3-linux.git;a=blob;f=arch/powerpc/platforms/ps3/htab.c;hb=HEAD#l70
The values of the variables printed all look strange compared with
commit 048ee0993 reverted. I'll try do some more work on it this
week.
-Geoff
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re[2]: PS3 platform is broken on Linux 3.7.0
2013-01-14 23:37 ` Geoff Levand
@ 2013-02-10 8:59 ` Phileas Fogg
2013-02-10 9:16 ` Re[3]: " Phileas Fogg
2013-02-11 20:56 ` Re[2]: " Geoff Levand
0 siblings, 2 replies; 18+ messages in thread
From: Phileas Fogg @ 2013-02-10 8:59 UTC (permalink / raw)
To: Geoff Levand; +Cc: linuxppc-dev, Aneesh Kumar K.V
IEhpLAoKaSBmb3VuZCB3aGVyZSB0aGUgcHJvYmxlbSBsaWVzLgpJIGFsc28gcHJpbnRlZCBzb21l
IHZhbHVlcyBpbiBwczNfaHB0ZV9pbnNlcnQgd2l0aCBhbmQgd2l0aG91dCA2NFRCIHN1cHBvcnQs
IGkgdXNlZCBPcGVuV1JUIHdpdGggTGludXggMy43LjYgZm9yIHRlc3RpbmcuCgpTb21lIHZhbHVl
cyB3aXRob3V0IDY0VEIgc3VwcG9ydDoKLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
L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y9wczMvaHRhYi5jO2hiPUhFQUQjbDcwCj4KPlRoZSB2YWx1ZXMgb2YgdGhlIHZhcmlh
YmxlcyBwcmludGVkIGFsbCBsb29rIHN0cmFuZ2UgY29tcGFyZWQgd2l0aAo+Y29tbWl0IDA0OGVl
MDk5MyByZXZlcnRlZC4gIEknbGwgdHJ5IGRvIHNvbWUgbW9yZSB3b3JrIG9uIGl0IHRoaXMKPndl
ZWsuCj4KPi1HZW9mZgo+Cj4KPgo+Cj4KPl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fCj5MaW51eHBwYy1kZXYgbWFpbGluZyBsaXN0Cj5MaW51eHBwYy1kZXZA
bGlzdHMub3psYWJzLm9yZwo+aHR0cHM6Ly9saXN0cy5vemxhYnMub3JnL2xpc3RpbmZvL2xpbnV4
cHBjLWRldgoK
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re[3]: PS3 platform is broken on Linux 3.7.0
2013-02-10 8:59 ` Re[2]: " Phileas Fogg
@ 2013-02-10 9:16 ` Phileas Fogg
2013-02-10 16:11 ` Aneesh Kumar K.V
2013-02-11 20:56 ` Re[2]: " Geoff Levand
1 sibling, 1 reply; 18+ messages in thread
From: Phileas Fogg @ 2013-02-10 9:16 UTC (permalink / raw)
To: Geoff Levand, linuxppc-dev, Aneesh Kumar K.V
[-- Attachment #1: Type: text/plain, Size: 5185 bytes --]
And another note.
I took a look at the MMU chapter in the Cell Architecture handbook and indeed the first 15 bits in VA are treated as 0 by the hardware.
Quote:
1. High-order bits above 65 bits in the 80-bit virtual address (VA[0:14]) are not implemented. The hardware always
treats these bits as `0'. Software must not set these bits to any other value than `0' or the results are undefined in
the PPE.
regards
Воскресенье, 10 февраля 2013, 12:59 +04:00 от Phileas Fogg <phileas-fogg@mail.ru>:
>Hi,
>
>i found where the problem lies.
>I also printed some values in ps3_hpte_insert with and without 64TB support, i used OpenWRT with Linux 3.7.6 for testing.
>
>Some values without 64TB support:
>-------------------------------------------------
>
>[ 0.060487] RPC: Registered named UNIX socket transport module.
>[ 0.060511] RPC: Registered udp transport module.
>[ 0.060672] RPC: Registered tcp transport module.
>[ 0.060873] RPC: Registered tcp NFSv4.1 backchannel transport module.
>[ 0.061080] initcall .init_sunrpc+0x0/0xbc returned 0 after 784 usecs
>[ 0.061280] calling .populate_rootfs+0x0/0x120 @ 1
>[ 0.061683] ps3_hpte_insert:result=0 vpn=f09b89af50101 pa=d4e0000 ix=dfa0 v=f09b89af5001 r=6c005d4e0194 psize=0 ssize=0 lpar=6c005d4e0000
>[ 0.061733] ps3_hpte_insert:result=0 vpn=f09b89af50102 pa=d4e1000 ix=dfb8 v=f09b89af5001 r=6c005d4e1194 psize=0 ssize=0 lpar=6c005d4e1000
>[ 0.061895] ps3_hpte_insert:result=0 vpn=f09b89af50103 pa=d4e2000 ix=dfb0 v=f09b89af5001 r=6c005d4e2194 psize=0 ssize=0 lpar=6c005d4e2000
>
>
>Some values with 64TB support:
>-------------------------------------------------
>
>[ 0.076477] calling .init_sunrpc+0x0/0xbc @ 1
>[ 0.076992] RPC: Registered named UNIX socket transport module.
>[ 0.077017] RPC: Registered udp transport module.
>[ 0.077076] RPC: Registered tcp transport module.
>[ 0.077277] RPC: Registered tcp NFSv4.1 backchannel transport module.
>[ 0.077484] initcall .init_sunrpc+0x0/0xbc returned 0 after 784 usecs
>[ 0.077684] calling .populate_rootfs+0x0/0x120 @ 1
>[ 0.078126] ps3_hpte_insert:result=-17 vpn=25008684d80101 pa=d567000 ix=2ec8 v=25008684d8001 r=6c005d567194 psize=0 ssize=0 lpar=6c005d567000
>[ 0.078164] ps3_hpte_insert:result=-17 vpn=25008684d80101 pa=d567000 ix=2ec8 v=25008684d8001 r=6c005d567194 psize=0 ssize=0 lpar=6c005d567000
>[ 0.078287] ------------[ cut here ]------------
>[ 0.078482] Kernel BUG at c00000000002cb3c [verbose debug info unavailable]
>[ 0.078686] Oops: Exception in kernel mode, sig: 5 [#1]
>[ 0.078883] SMP NR_CPUS=2 PS3
>[ 0.079084] Modules linked in:
>[ 0.079287] NIP: c00000000002cb3c LR: c00000000002cb38 CTR: 00000000002ffc38
>[ 0.079489] REGS: c00000000d04f0e0 TRAP: 0700 Not tainted (3.7.6)
>[ 0.079687] MSR: 8000000000020032 <SF,IR,DR,RI> CR: 22000022 XER: 00000000
>[ 0.079888] SOFTE: 0
>[ 0.080090] TASK = c00000000d049060[1] 'swapper/1' THREAD: c00000000d04c000 CPU: 1
>GPR00: c00000000002cb38 c00000000d04f360 c0000000012ec8d0 0000000000000081
>GPR04: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>GPR08: 0000000000000000 c00000000124ce10 0000000000000000 c00000000002bcf0
>GPR12: 0000000022000022 c000000007ffe280 c000000000008c94 c0000000005cba00
>
>
>
>And now take a look at 'v' values in both cases.
>
>Without 64TB support: v=f09b89af5001
>With 64TB support: v=25008684d8001
>
>Number of leading zeros in f09b89af5001 is 16.
>Number of leading zeros in 25008684d8001 is 14.
>
>And that's why lv1_insert_htab_entry fails with -17 which means LV1_ILLEGAL_PARAMETER_VALUE because
>the Hypervisor of PS3 checks 'AVPN' values for number of leading zeros and allows at least 15 bits which in case
>of 'v' value 25008684d8001 is too small of course.
>
>Not sure how to fix it in current Linux kernel. You guys know it better than me.
>
>Regards
>
>
>
>
>Понедельник, 14 января 2013, 15:37 -08:00 от Geoff Levand < geoff@infradead.org >:
>>Hi,
>>
>>On Fri, 2013-01-11 at 18:12 -0800, Geoff Levand wrote:
>>> I checked these, and Michael's 407821a34fce89b4f0b031dbab5cec7d059f46bc
>>> does indeed cause the LV1 hypervisor to panic early, and if that is
>>> reverted, Aneesh's 048ee0993ec8360abb0b51bdf8f8721e9ed62ec4 hits a BUG.
>>
>>Just to give an update, I did a little more work on it and found that
>>the call to lv1_insert_htab_entry() inside ps3_hpte_insert() is
>>failing.
>>
>> http://git.kernel.org/?p=linux/kernel/git/geoff/ps3-linux.git;a=blob;f=arch/powerpc/platforms/ps3/htab.c;hb=HEAD#l70
>>
>>The values of the variables printed all look strange compared with
>>commit 048ee0993 reverted. I'll try do some more work on it this
>>week.
>>
>>-Geoff
>>
>>
>>
>>
>>
>>_______________________________________________
>>Linuxppc-dev mailing list
>>Linuxppc-dev@lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
>_______________________________________________
>Linuxppc-dev mailing list
>Linuxppc-dev@lists.ozlabs.org
>https://lists.ozlabs.org/listinfo/linuxppc-dev
[-- Attachment #2: Type: text/html, Size: 6880 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re[2]: PS3 platform is broken on Linux 3.7.0
2012-12-19 21:53 ` Benjamin Herrenschmidt
2013-01-12 2:12 ` Geoff Levand
@ 2013-02-10 11:45 ` Phileas Fogg
2013-02-10 12:17 ` Re[3]: " Phileas Fogg
1 sibling, 1 reply; 18+ messages in thread
From: Phileas Fogg @ 2013-02-10 11:45 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Aneesh Kumar K.V
Cj5PbiBGcmksIDIwMTItMTItMTQgYXQgMTY6MzUgKzA0MDAsIFBoaWxlYXMgRm9nZyB3cm90ZToK
Pj4gSGksCj4+IAo+PiBJIHdhbnRlZCB0byBicmluZyB0byB5b3VyIGF0dGVudGlvbiB0aGUgZmFj
dCB0aGF0IHRoZSBQUzMgcGxhdGZvcm0gaXMgYnJva2VuIG9uIExpbnV4IDMuNy4wLgo+PiAKPj4g
aSdtIG5vdCBhYmxlIHRvIGJvb3QgTGludXggMy43LjAgb24gbXkgUFMzIHNsaW0uIExpbnV4IDMu
Ni4xMCBib290cyBqdXN0IGZpbmUgYnV0IG5vdCAzLjcuMAo+PiBXaGVuIGkgdHJ5IHRvIGJvb3Qg
TGludXggMy43LjAgdGhlbiBteSBQUzMgIHNodXRzIGRvd24uCj4+IAo+PiBTbyBpIGNsb25lZCB0
aGUgTGludXggcG93ZXJwYyBHSVQgcmVwb3NpdG9yeSBhbmQgdHJpZWQgdG8gZmluZCB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ZWwvc2V0dXBfNjQuYwkyMDEzLTAyLTEwIDEzOjQwOjUx
LjY5NzEzNTQxOSArMDEwMApAQCAtMTg2LDYgKzE4Niw5IEBACiAJaW5pdGlhbGlzZV9wYWNhKCZi
b290X3BhY2EsIDApOwogCXNldHVwX3BhY2EoJmJvb3RfcGFjYSk7CiAKKwkvKiBBbGxvdyBwZXJj
cHUgYWNjZXNzZXMgdG8gIndvcmsiIHVudGlsIHdlIHNldHVwIHBlcmNwdSBkYXRhICovCisJZ2V0
X3BhY2EoKS0+ZGF0YV9vZmZzZXQgPSAwOworCiAJLyogSW5pdGlhbGl6ZSBsb2NrZGVwIGVhcmx5
IG9yIGVsc2Ugc3BpbmxvY2tzIHdpbGwgYmxvdyAqLwogCWxvY2tkZXBfaW5pdCgpOwogCkBAIC0y
MDgsOCArMjExLDYgQEAKIAogCS8qIEZpeCB1cCBwYWNhIGZpZWxkcyByZXF1aXJlZCBmb3IgdGhl
IGJvb3QgY3B1ICovCiAJZ2V0X3BhY2EoKS0+Y3B1X3N0YXJ0ID0gMTsKLQkvKiBBbGxvdyBwZXJj
cHUgYWNjZXNzZXMgdG8gIndvcmsiIHVudGlsIHdlIHNldHVwIHBlcmNwdSBkYXRhICovCi0JZ2V0
X3BhY2EoKS0+ZGF0YV9vZmZzZXQgPSAwOwogCiAJLyogUHJvYmUgdGhlIG1hY2hpbmUgdHlwZSAq
LwogCXByb2JlX21hY2hpbmUoKTsKCgoKCg==
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re[3]: PS3 platform is broken on Linux 3.7.0
2013-02-10 11:45 ` Phileas Fogg
@ 2013-02-10 12:17 ` Phileas Fogg
2013-02-10 15:46 ` Aneesh Kumar K.V
0 siblings, 1 reply; 18+ messages in thread
From: Phileas Fogg @ 2013-02-10 12:17 UTC (permalink / raw)
To: Benjamin Herrenschmidt, linuxppc-dev, Aneesh Kumar K.V
IFBsZWFzZSBpZ25vcmUgdGhlIHByZXZpb3VzIHBhdGNoIHRvIGZpeC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lIHR5cGUgKi8KPsKgCXByb2JlX21h
Y2hpbmUoKTsKPgo+Cj4KPgo+X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX18KPkxpbnV4cHBjLWRldiBtYWlsaW5nIGxpc3QKPkxpbnV4cHBjLWRldkBsaXN0cy5v
emxhYnMub3JnCj5odHRwczovL2xpc3RzLm96bGFicy5vcmcvbGlzdGluZm8vbGludXhwcGMtZGV2
Cgo=
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Re[3]: PS3 platform is broken on Linux 3.7.0
2013-02-10 12:17 ` Re[3]: " Phileas Fogg
@ 2013-02-10 15:46 ` Aneesh Kumar K.V
2013-02-10 17:51 ` Re[5]: " Phileas Fogg
0 siblings, 1 reply; 18+ messages in thread
From: Aneesh Kumar K.V @ 2013-02-10 15:46 UTC (permalink / raw)
To: Phileas Fogg, Benjamin Herrenschmidt, linuxppc-dev
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Re[3]: PS3 platform is broken on Linux 3.7.0
2013-02-10 9:16 ` Re[3]: " Phileas Fogg
@ 2013-02-10 16:11 ` Aneesh Kumar K.V
2013-02-11 10:26 ` Aneesh Kumar K.V
0 siblings, 1 reply; 18+ messages in thread
From: Aneesh Kumar K.V @ 2013-02-10 16:11 UTC (permalink / raw)
To: Phileas Fogg, Geoff Levand, linuxppc-dev
Phileas Fogg <phileas-fogg@mail.ru> writes:
> And another note.
> I took a look at the MMU chapter in the Cell Architecture handbook and in=
deed the first 15 bits in VA are treated as 0 by the hardware.
>
> Quote:
>
> 1. High-order bits above 65 bits in the 80-bit virtual address (VA[0:14])=
are not implemented. The hardware always
> =C2=A0=C2=A0 treats these bits as `0'. Software must not set these bits t=
o any other value than `0' or the results are undefined in
> =C2=A0=C2=A0 the PPE.
>
>
True, we missed the below part of ISA doc:
ISA doc says
"On implementations that support a virtual address size
of only n bits, n < 78, bits 0:77-n of the AVA field must be
zeros. "
The Cell document I found at=20
https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/7A77CCDF14FE70D58=
52575CA0074E8ED/$file/CellBE_Handbook_v1.12_3Apr09_pub.pdf
gives=20
Virtual Address (VA) Size -> 65 bits
So as per ISA, bits 0:12 should be zero, which should make 0:14 of PTE
fields zero for Cell.
I will try to do a patch.=20
Thanks for debugging this.
-aneesh
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re[5]: PS3 platform is broken on Linux 3.7.0
2013-02-10 15:46 ` Aneesh Kumar K.V
@ 2013-02-10 17:51 ` Phileas Fogg
2013-02-11 3:39 ` Michael Ellerman
0 siblings, 1 reply; 18+ messages in thread
From: Phileas Fogg @ 2013-02-10 17:51 UTC (permalink / raw)
To: Aneesh Kumar K.V; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1978 bytes --]
>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:
--- 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();
It seems that 'boot_paca' and 'get_paca()' refer to different PACAs.
regards
[-- Attachment #2: Type: text/html, Size: 3151 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: PS3 platform is broken on Linux 3.7.0
2013-02-10 17:51 ` Re[5]: " Phileas Fogg
@ 2013-02-11 3:39 ` Michael Ellerman
0 siblings, 0 replies; 18+ messages in thread
From: Michael Ellerman @ 2013-02-11 3:39 UTC (permalink / raw)
To: Phileas Fogg; +Cc: linuxppc-dev, Aneesh Kumar K.V
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Re[3]: PS3 platform is broken on Linux 3.7.0
2013-02-10 16:11 ` Aneesh Kumar K.V
@ 2013-02-11 10:26 ` Aneesh Kumar K.V
2013-02-11 16:57 ` Re[5]: " Phileas Fogg
2013-02-12 1:11 ` Re[3]: " Geoff Levand
0 siblings, 2 replies; 18+ messages in thread
From: Aneesh Kumar K.V @ 2013-02-11 10:26 UTC (permalink / raw)
To: Phileas Fogg, Geoff Levand, linuxppc-dev
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:
> Phileas Fogg <phileas-fogg@mail.ru> writes:
>
>> And another note.
>> I took a look at the MMU chapter in the Cell Architecture handbook and i=
ndeed the first 15 bits in VA are treated as 0 by the hardware.
>>
>> Quote:
>>
>> 1. High-order bits above 65 bits in the 80-bit virtual address (VA[0:14]=
) are not implemented. The hardware always
>> =C2=A0=C2=A0 treats these bits as `0'. Software must not set these bits =
to any other value than `0' or the results are undefined in
>> =C2=A0=C2=A0 the PPE.
>>
>>
>
> True, we missed the below part of ISA doc:
>
> ISA doc says
>
> "On implementations that support a virtual address size
> of only n bits, n < 78, bits 0:77-n of the AVA field must be
> zeros. "
>
> The Cell document I found at=20
>
> https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/7A77CCDF14FE70D=
5852575CA0074E8ED/$file/CellBE_Handbook_v1.12_3Apr09_pub.pdf
>
> gives=20
>
> Virtual Address (VA) Size -> 65 bits
>
> So as per ISA, bits 0:12 should be zero, which should make 0:14 of PTE
> fields zero for Cell.
>
> I will try to do a patch.=20
>
Can you try this patch ?
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/a=
sm/mmu-hash64.h
index 2fdb47a..f01fd9a 100644
--- a/arch/powerpc/include/asm/mmu-hash64.h
+++ b/arch/powerpc/include/asm/mmu-hash64.h
@@ -381,21 +381,37 @@ extern void slb_set_size(u16 size);
* hash collisions.
*/
=20
+/* This should go in Kconfig */
+/*
+ * Be careful with this value. This determines the VSID_MODULUS_* and that
+ * need to be co-prime with VSID_MULTIPLIER*
+ */
+#if 1
+#define MAX_VIRTUAL_ADDR_BITS 65
+#else
+#define MAX_VIRTUAL_ADDR_BITS 66
+#endif
+/*
+ * One bit is taken by the kernel, only the rest of space is available for=
the
+ * user space.
+ */
+#define CONTEXT_BITS (MAX_VIRTUAL_ADDR_BITS - \
+ (USER_ESID_BITS + SID_SHIFT + 1))
+#define USER_ESID_BITS 18
+#define USER_ESID_BITS_1T 6
+
/*
* This should be computed such that protovosid * vsid_mulitplier
* doesn't overflow 64 bits. It should also be co-prime to vsid_modulus
*/
#define VSID_MULTIPLIER_256M ASM_CONST(12538073) /* 24-bit prime */
-#define VSID_BITS_256M 38
+#define VSID_BITS_256M (CONTEXT_BITS + USER_ESID_BITS + 1)
#define VSID_MODULUS_256M ((1UL<<VSID_BITS_256M)-1)
=20
#define VSID_MULTIPLIER_1T ASM_CONST(12538073) /* 24-bit prime */
-#define VSID_BITS_1T 26
+#define VSID_BITS_1T (CONTEXT_BITS + USER_ESID_BITS_1T + 1)
#define VSID_MODULUS_1T ((1UL<<VSID_BITS_1T)-1)
=20
-#define CONTEXT_BITS 19
-#define USER_ESID_BITS 18
-#define USER_ESID_BITS_1T 6
=20
#define USER_VSID_RANGE (1UL << (USER_ESID_BITS + SID_SHIFT))
=20
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re[5]: PS3 platform is broken on Linux 3.7.0
2013-02-11 10:26 ` Aneesh Kumar K.V
@ 2013-02-11 16:57 ` Phileas Fogg
2013-02-12 1:11 ` Re[3]: " Geoff Levand
1 sibling, 0 replies; 18+ messages in thread
From: Phileas Fogg @ 2013-02-11 16:57 UTC (permalink / raw)
To: Aneesh Kumar K.V; +Cc: Geoff Levand, linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 2859 bytes --]
>"Aneesh Kumar K.V" < aneesh.kumar@linux.vnet.ibm.com > writes:
>
>> Phileas Fogg < phileas-fogg@mail.ru > writes:
>>
>>> And another note.
>>> I took a look at the MMU chapter in the Cell Architecture handbook and indeed the first 15 bits in VA are treated as 0 by the hardware.
>>>
>>> Quote:
>>>
>>> 1. High-order bits above 65 bits in the 80-bit virtual address (VA[0:14]) are not implemented. The hardware always
>>> treats these bits as `0'. Software must not set these bits to any other value than `0' or the results are undefined in
>>> the PPE.
>>>
>>>
>>
>> True, we missed the below part of ISA doc:
>>
>> ISA doc says
>>
>> "On implementations that support a virtual address size
>> of only n bits, n < 78, bits 0:77-n of the AVA field must be
>> zeros. "
>>
>> The Cell document I found at
>>
>> https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/7A77CCDF14FE70D5852575CA0074E8ED/$file/CellBE_Handbook_v1.12_3Apr09_pub.pdf
>>
>> gives
>>
>> Virtual Address (VA) Size -> 65 bits
>>
>> So as per ISA, bits 0:12 should be zero, which should make 0:14 of PTE
>> fields zero for Cell.
>>
>> I will try to do a patch.
>>
>
>Can you try this patch ?
>
>diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
>index 2fdb47a..f01fd9a 100644
>--- a/arch/powerpc/include/asm/mmu-hash64.h
>+++ b/arch/powerpc/include/asm/mmu-hash64.h
>@@ -381,21 +381,37 @@ extern void slb_set_size(u16 size);
> * hash collisions.
> */
>
>+/* This should go in Kconfig */
>+/*
>+ * Be careful with this value. This determines the VSID_MODULUS_* and that
>+ * need to be co-prime with VSID_MULTIPLIER*
>+ */
>+#if 1
>+#define MAX_VIRTUAL_ADDR_BITS 65
>+#else
>+#define MAX_VIRTUAL_ADDR_BITS 66
>+#endif
>+/*
>+ * One bit is taken by the kernel, only the rest of space is available for the
>+ * user space.
>+ */
>+#define CONTEXT_BITS (MAX_VIRTUAL_ADDR_BITS - \
>+ (USER_ESID_BITS + SID_SHIFT + 1))
>+#define USER_ESID_BITS 18
>+#define USER_ESID_BITS_1T 6
>+
> /*
> * This should be computed such that protovosid * vsid_mulitplier
> * doesn't overflow 64 bits. It should also be co-prime to vsid_modulus
> */
> #define VSID_MULTIPLIER_256M ASM_CONST(12538073) /* 24-bit prime */
>-#define VSID_BITS_256M 38
>+#define VSID_BITS_256M (CONTEXT_BITS + USER_ESID_BITS + 1)
> #define VSID_MODULUS_256M ((1UL<<VSID_BITS_256M)-1)
>
> #define VSID_MULTIPLIER_1T ASM_CONST(12538073) /* 24-bit prime */
>-#define VSID_BITS_1T 26
>+#define VSID_BITS_1T (CONTEXT_BITS + USER_ESID_BITS_1T + 1)
> #define VSID_MODULUS_1T ((1UL<<VSID_BITS_1T)-1)
>
>-#define CONTEXT_BITS 19
>-#define USER_ESID_BITS 18
>-#define USER_ESID_BITS_1T 6
>
> #define USER_VSID_RANGE (1UL << (USER_ESID_BITS + SID_SHIFT))
>
>
Testing it with Linux 3.8.0-rc7, it looks good so far under heavy hard disk usage.
[-- Attachment #2: Type: text/html, Size: 4105 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Re[2]: PS3 platform is broken on Linux 3.7.0
2013-02-10 8:59 ` Re[2]: " Phileas Fogg
2013-02-10 9:16 ` Re[3]: " Phileas Fogg
@ 2013-02-11 20:56 ` Geoff Levand
1 sibling, 0 replies; 18+ messages in thread
From: Geoff Levand @ 2013-02-11 20:56 UTC (permalink / raw)
To: Phileas Fogg; +Cc: linuxppc-dev, Aneesh Kumar K.V
On Sun, 2013-02-10 at 12:59 +0400, Phileas Fogg wrote:
> i found where the problem lies.
...
> And that's why lv1_insert_htab_entry fails with -17 which means LV1_ILLEGAL_PARAMETER_VALUE because
> the Hypervisor of PS3 checks 'AVPN' values for number of leading zeros and allows at least 15 bits which in case
> of 'v' value 25008684d8001 is too small of course.
Excellent work, thanks for debugging!
-Geoff
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Re[3]: PS3 platform is broken on Linux 3.7.0
2013-02-11 10:26 ` Aneesh Kumar K.V
2013-02-11 16:57 ` Re[5]: " Phileas Fogg
@ 2013-02-12 1:11 ` Geoff Levand
1 sibling, 0 replies; 18+ messages in thread
From: Geoff Levand @ 2013-02-12 1:11 UTC (permalink / raw)
To: Aneesh Kumar K.V; +Cc: Phileas Fogg, linuxppc-dev
Hi Aneesh,
On Mon, 2013-02-11 at 15:56 +0530, Aneesh Kumar K.V wrote:
> Can you try this patch ?
>
> diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
I tried your patch on PS3 with a ps3_defconfig build on both Linux-3.7
and Linux-3.8-rc7 and it seems to be working OK.
Please try to prepare a final fix for v3.8 and also send to linux-stable
for v3.7.
Thanks!
-Geoff
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: PS3 platform is broken on Linux 3.7.0
2012-12-14 12:35 PS3 platform is broken on Linux 3.7.0 Phileas Fogg
2012-12-19 21:53 ` Benjamin Herrenschmidt
@ 2013-02-13 7:32 ` Geoff Levand
2013-02-13 22:37 ` Michael Ellerman
1 sibling, 1 reply; 18+ messages in thread
From: Geoff Levand @ 2013-02-13 7:32 UTC (permalink / raw)
To: Phileas Fogg, Michael Ellerman; +Cc: cbe-oss-dev, linuxppc-dev
Hi,
On Fri, 2012-12-14 at 16:35 +0400, Phileas Fogg wrote:
> I wanted to bring to your attention the fact that the PS3 platform is broken on Linux 3.7.0.
> So i cloned the Linux powerpc GIT repository and tried to find out which commits broke the PS3 platform.
> ---------------------------------------------------------------------------------------------
>
> commit 407821a34fce89b4f0b031dbab5cec7d059f46bc
> Author: Michael Ellerman <michael@ellerman.id.au>
> Date: Fri Sep 7 15:31:44 2012 +0000
>
> powerpc: Initialise paca.data_offset with poison
I did a little more work on this, and it seems the change below
will fix the problem introduced by Michael's change. I can only
guess we need to use udbg_printf() here. I'll look at it some more
as I have time.
-Geoff
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index 5c56834..6b4f613 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -184,8 +185,8 @@ void __init allocate_pacas(void)
paca = __va(memblock_alloc_base(paca_size, PAGE_SIZE, limit));
memset(paca, 0, paca_size);
- printk(KERN_DEBUG "Allocated %u bytes for %d pacas at %p\n",
- paca_size, nr_cpu_ids, paca);
+// printk(KERN_DEBUG "Allocated %u bytes for %d pacas at %p\n",
+// paca_size, nr_cpu_ids, paca);
allocate_lppacas(nr_cpu_ids, limit);
>
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: PS3 platform is broken on Linux 3.7.0
2013-02-13 7:32 ` Geoff Levand
@ 2013-02-13 22:37 ` Michael Ellerman
0 siblings, 0 replies; 18+ messages in thread
From: Michael Ellerman @ 2013-02-13 22:37 UTC (permalink / raw)
To: Geoff Levand; +Cc: Phileas Fogg, cbe-oss-dev, linuxppc-dev
On Tue, Feb 12, 2013 at 11:32:59PM -0800, Geoff Levand wrote:
> Hi,
>
> On Fri, 2012-12-14 at 16:35 +0400, Phileas Fogg wrote:
> > I wanted to bring to your attention the fact that the PS3 platform is broken on Linux 3.7.0.
>
> > So i cloned the Linux powerpc GIT repository and tried to find out which commits broke the PS3 platform.
>
> > ---------------------------------------------------------------------------------------------
> >
> > commit 407821a34fce89b4f0b031dbab5cec7d059f46bc
> > Author: Michael Ellerman <michael@ellerman.id.au>
> > Date: Fri Sep 7 15:31:44 2012 +0000
> >
> > powerpc: Initialise paca.data_offset with poison
>
> I did a little more work on this, and it seems the change below
> will fix the problem introduced by Michael's change. I can only
> guess we need to use udbg_printf() here. I'll look at it some more
> as I have time.
Have you tried with the patch I posted yesterday?
cheers
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2013-02-13 22:37 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-14 12:35 PS3 platform is broken on Linux 3.7.0 Phileas Fogg
2012-12-19 21:53 ` Benjamin Herrenschmidt
2013-01-12 2:12 ` Geoff Levand
2013-01-14 23:37 ` Geoff Levand
2013-02-10 8:59 ` Re[2]: " Phileas Fogg
2013-02-10 9:16 ` Re[3]: " Phileas Fogg
2013-02-10 16:11 ` Aneesh Kumar K.V
2013-02-11 10:26 ` Aneesh Kumar K.V
2013-02-11 16:57 ` Re[5]: " Phileas Fogg
2013-02-12 1:11 ` Re[3]: " Geoff Levand
2013-02-11 20:56 ` Re[2]: " Geoff Levand
2013-02-10 11:45 ` Phileas Fogg
2013-02-10 12:17 ` Re[3]: " Phileas Fogg
2013-02-10 15:46 ` Aneesh Kumar K.V
2013-02-10 17:51 ` Re[5]: " Phileas Fogg
2013-02-11 3:39 ` Michael Ellerman
2013-02-13 7:32 ` Geoff Levand
2013-02-13 22:37 ` Michael Ellerman
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).