Update: now with the proper mailing address.
Hi,
Posting if anyone knows how to quickly fix it :)
Enabling CONFIG_PPC_EARLY_DEBUG on my quad G5 causes kernel to die
with the unrecoverable exception 4100.
I haven't bisected this yet. Photo attached.
Thanks!
On Mon, 2016-06-06 at 10:52 +0300, Denis Kirjanov wrote:
quoted
Update: now with the proper mailing address.
Hi,
Posting if anyone knows how to quickly fix it :)
Sorry but no.
quoted
Enabling CONFIG_PPC_EARLY_DEBUG on my quad G5 causes kernel to die
with the unrecoverable exception 4100.
That means you took a SLB miss when MSR_RI was off.
What's at c000000000ace328 ?
quoted
I haven't bisected this yet. Photo attached.
A bisect would be awesome.
Ok, the issue was introduced by the commit
caca285e5ab4a7a19fede51688106ceed6fc45dd (powerpc/mm/radix: Use
STD_MMU_64 to properly isolate hash related code) and 970mp dies on
the following condition:
+BEGIN_MMU_FTR_SECTION
bl slb_allocate_realmode
-
+END_MMU_FTR_SECTION_IFCLR(MMU_FTR_RADIX)
In my config I've enabled radix MMU lookup but in my understanding
only recent IBM machines support this feature and we have to call SLB
entry through slb_allocate_realmode on HPTE machine?
Thanks!
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2016-06-16 12:07:16
On Thu, 2016-06-16 at 11:12 +0300, Denis Kirjanov wrote:
On 6/6/16, Michael Ellerman [off-list ref] wrote:
quoted
On Mon, 2016-06-06 at 10:52 +0300, Denis Kirjanov wrote:
quoted
I haven't bisected this yet. Photo attached.
A bisect would be awesome.
Ok, the issue was introduced by the commit
caca285e5ab4a7a19fede51688106ceed6fc45dd (powerpc/mm/radix: Use
STD_MMU_64 to properly isolate hash related code) and 970mp dies on
the following condition:
Thanks.
How did you work that out?
That FTR section says to call slb_allocate_realmode() when MMU_FTR_RADIX is
clear (ie. zero). That should always be the case on your machine, unless you've
plugged a Power9 into your G5 ;)
In my config I've enabled radix MMU lookup but in my understanding
only recent IBM machines support this feature and we have to call SLB
entry through slb_allocate_realmode on HPTE machine?
That's right, and that's what the code should be doing.
My G5 is booting OK:
michael@cogito:~$ uname -a
Linux cogito 4.7.0-rc3-gdb06d75 #1 SMP Thu Jun 16 05:16:31 AEST 2016 ppc64 GNU/Linux
michael@cogito:~$ cat /proc/cpuinfo
processor : 0
cpu : PPC970FX, altivec supported
clock : 1599.999000MHz
revision : 3.0 (pvr 003c 0300)
timebase : 33333333
platform : PowerMac
model : PowerMac8,1
machine : PowerMac8,1
motherboard : PowerMac8,1 MacRISC4 Power Macintosh
detected as : 338 (iMac G5)
pmac flags : 00000000
L2 cache : 512K unified
pmac-generation : NewWorld
michael@cogito:~$ zgrep RADIX /proc/config.gz
CONFIG_PPC_RADIX_MMU=y
michael@cogito:~$ dmesg|grep _features
[ 0.000000] cpu_features = 0x0804806318100448
[ 0.000000] cpu_user_features = 0xdc080000 0x00000000
[ 0.000000] mmu_features = 0x0c000001
[ 0.000000] firmware_features = 0x0000000000000000
In particular notice:
#define MMU_FTR_RADIX ASM_CONST(0x80000000)
mmu_features = 0x0c000001
ie. MMU_FTR_RADIX is clear.
Do you see a different value for mmu_features?
cheers
Ok, the issue was introduced by the commit
caca285e5ab4a7a19fede51688106ceed6fc45dd (powerpc/mm/radix: Use
STD_MMU_64 to properly isolate hash related code) and 970mp dies on
the following condition:
Thanks.
How did you work that out?
That FTR section says to call slb_allocate_realmode() when MMU_FTR_RADIX is
clear (ie. zero). That should always be the case on your machine, unless
you've
plugged a Power9 into your G5 ;)
quoted
In my config I've enabled radix MMU lookup but in my understanding
only recent IBM machines support this feature and we have to call SLB
entry through slb_allocate_realmode on HPTE machine?
That's right, and that's what the code should be doing.
My G5 is booting OK:
michael@cogito:~$ uname -a
Linux cogito 4.7.0-rc3-gdb06d75 #1 SMP Thu Jun 16 05:16:31 AEST 2016 ppc64
GNU/Linux
michael@cogito:~$ cat /proc/cpuinfo
processor : 0
cpu : PPC970FX, altivec supported
clock : 1599.999000MHz
revision : 3.0 (pvr 003c 0300)
timebase : 33333333
platform : PowerMac
model : PowerMac8,1
machine : PowerMac8,1
motherboard : PowerMac8,1 MacRISC4 Power Macintosh
detected as : 338 (iMac G5)
pmac flags : 00000000
L2 cache : 512K unified
pmac-generation : NewWorld
michael@cogito:~$ zgrep RADIX /proc/config.gz
CONFIG_PPC_RADIX_MMU=y
michael@cogito:~$ dmesg|grep _features
[ 0.000000] cpu_features = 0x0804806318100448
[ 0.000000] cpu_user_features = 0xdc080000 0x00000000
[ 0.000000] mmu_features = 0x0c000001
[ 0.000000] firmware_features = 0x0000000000000000
In particular notice:
#define MMU_FTR_RADIX ASM_CONST(0x80000000)
mmu_features = 0x0c000001
ie. MMU_FTR_RADIX is clear.
Do you see a different value for mmu_features?
Oops, I messed things up, sorry :/
The reason is here:
/* All done -- return from exception. */
ld r10,PACA_EXSLB+EX_LR(r13)
@@ -1384,7 +1399,9 @@ slb_miss_realmode: lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */ mtlr r10-+BEGIN_MMU_FTR_SECTION+ b 2f+END_MMU_FTR_SECTION_IFSET(MMU_FTR_RADIX) andi. r10,r12,MSR_RI /* check for unrecoverable exception */ beq- 2f
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2016-06-17 01:46:04
On Fri, 2016-06-17 at 08:33 +1000, Benjamin Herrenschmidt wrote:
On Thu, 2016-06-16 at 22:49 +0300, Denis Kirjanov wrote:
quoted
-
+BEGIN_MMU_FTR_SECTION
+ b 2f
+END_MMU_FTR_SECTION_IFSET(MMU_FTR_RADIX)
andi. r10,r12,MSR_RI /* check for unrecoverable exception
*/
beq- 2f
Are we taking an SLB miss before we do the fixup maybe ?
Yeah that's the only explanation that makes any sense.
I think instead of patching down this low we should instead be redirecting SLB
misses to unknown_exception() when radix is enabled. Aneesh?
cheers
On Fri, 2016-06-17 at 08:33 +1000, Benjamin Herrenschmidt wrote:
quoted
On Thu, 2016-06-16 at 22:49 +0300, Denis Kirjanov wrote:
quoted
-
+BEGIN_MMU_FTR_SECTION
+ b 2f
+END_MMU_FTR_SECTION_IFSET(MMU_FTR_RADIX)
andi. r10,r12,MSR_RI /* check for unrecoverable exception
*/
beq- 2f
Are we taking an SLB miss before we do the fixup maybe ?
Yeah that's the only explanation that makes any sense.
I think instead of patching down this low we should instead be redirecting SLB
misses to unknown_exception() when radix is enabled. Aneesh?
The 2f branch ends up doing unrecoverable exception. Or are you
suggesting something else ?
-aneesh
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2016-06-20 09:23:50
On Sat, 2016-06-18 at 22:47 +0530, Aneesh Kumar K.V wrote:
Michael Ellerman [off-list ref] writes:
quoted
On Fri, 2016-06-17 at 08:33 +1000, Benjamin Herrenschmidt wrote:
quoted
On Thu, 2016-06-16 at 22:49 +0300, Denis Kirjanov wrote:
quoted
-
+BEGIN_MMU_FTR_SECTION
+ b 2f
+END_MMU_FTR_SECTION_IFSET(MMU_FTR_RADIX)
andi. r10,r12,MSR_RI /* check for unrecoverable exception
*/
beq- 2f
Are we taking an SLB miss before we do the fixup maybe ?
Yeah that's the only explanation that makes any sense.
I think instead of patching down this low we should instead be redirecting SLB
misses to unknown_exception() when radix is enabled. Aneesh?
The 2f branch ends up doing unrecoverable exception. Or are you
suggesting something else ?
I meant more like diverting to unknown_exception() higher up the call stack, but
that's complicated.
How about this? Denis does this work?
cheers
On Sat, 2016-06-18 at 22:47 +0530, Aneesh Kumar K.V wrote:
quoted
Michael Ellerman [off-list ref] writes:
quoted
On Fri, 2016-06-17 at 08:33 +1000, Benjamin Herrenschmidt wrote:
quoted
On Thu, 2016-06-16 at 22:49 +0300, Denis Kirjanov wrote:
quoted
-
+BEGIN_MMU_FTR_SECTION
+ b 2f
+END_MMU_FTR_SECTION_IFSET(MMU_FTR_RADIX)
andi. r10,r12,MSR_RI /* check for unrecoverable exception
*/
beq- 2f
Are we taking an SLB miss before we do the fixup maybe ?
Yeah that's the only explanation that makes any sense.
I think instead of patching down this low we should instead be redirecting SLB
misses to unknown_exception() when radix is enabled. Aneesh?
The 2f branch ends up doing unrecoverable exception. Or are you
suggesting something else ?
I meant more like diverting to unknown_exception() higher up the call stack, but
that's complicated.
How about this? Denis does this work?
cheers
Well s/fixed/avoided/.
I'd rather we fixed the root cause, which is that the SLB miss handler is broken
until code patching happens. When possible we should write feature sections so
that the unpatched code is functional, to avoid problems like this.
cheers