Skip to contentSkip to conversation

Kernel 5.1-rc1 fails to boot on a PowerMac G4 3,6: Caused by (from SRR1=141020): Transfer error ack signal

Bug 203125 [email protected] 2 participants 9 messages May 8, 2019 – May 22, 2019 1 message not in the archive PowerPC

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

#1 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=203125

--- Comment #4 from Erhard F. ([email protected]) --- Created attachment 282679
--> https://bugzilla.kernel.org/attachment.cgi?id=282679&action=edit
bisect.log

Finally, the results of the bisect...

f7354ccac844da7b1af8cc4f09da330fa3e960e4 is the first bad commit commit f7354ccac844da7b1af8cc4f09da330fa3e960e4

Author: Christophe Leroy <[email protected]>
Date:   Thu Jan 31 10:09:04 2019 +0000

powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU

Now that thread_info is similar to task_struct, its address is in r2 so CURRENT_THREAD_INFO() macro is useless. This patch removes it.

This patch also moves the 'tovirt(r2, r2)' down just before the reactivation of MMU translation, so that we keep the physical address of 'current' in r2 until then. It avoids a few calls to tophys().

At the same time, as the 'cpu' field is not anymore in thread_info, TI_CPU is renamed TASK_CPU by this patch.

It also allows to get rid of a couple of
'#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE' as ACCOUNT_CPU_USER_ENTRY() and ACCOUNT_CPU_USER_EXIT() are empty when CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not defined.

[mpe: Fix a missed conversion of TI_CPU idle_6xx.S]

:040000 040000 c7a4d4ea7c2864b693e82a075f62e26dfcb82c84
a15e8516fdadda87981702d86b38b0e07672220b M arch

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=203125

Christophe Leroy ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #5 from Christophe Leroy ([email protected]) --- Apparently, MSR DR is not sent and DAR has value 0xc0090654, meaning that a virt address tries to get accessed while in real mode.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#3 lore raw
Quoted 4 lines · On 05/09/2019 10:05 AM, [email protected] wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=203125

Christophe Leroy ([email protected]) changed:

Quoted 8 lines

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #5 from Christophe Leroy ([email protected]) --- Apparently, MSR DR is not sent and DAR has value 0xc0090654, meaning that a virt address tries to get accessed while in real mode.

Could you try the patch below:

arch/powerpc/mm/book3s32/hash_low.S +2 -1
index e27792d0b744..8366c2abeafc 100644
@@ -539,7 +539,8 @@ _GLOBAL(flush_hash_pages)
 #ifdef CONFIG_SMP
 	lis	r9, (mmu_hash_lock - PAGE_OFFSET)@ha
 	addi	r9, r9, (mmu_hash_lock - PAGE_OFFSET)@l
-	lwz	r8,TASK_CPU(r2)
+	tophys	(r8, r2)
+	lwz	r8, TASK_CPU(r8)
 	oris	r8,r8,9
 10:	lwarx	r0,0,r9
 	cmpi	0,r0,0

Christophe

#4 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=203125

--- Comment #6 from Christophe Leroy ([email protected]) --- Try followin change:

(quoted diff) +0 -0

b/arch/powerpc/mm/book3s32/hash_low.S
index e27792d0b744..8366c2abeafc 100644

arch/powerpc/mm/book3s32/hash_low.S +2 -1
@@ -539,7 +539,8 @@ _GLOBAL(flush_hash_pages)
 #ifdef CONFIG_SMP
     lis    r9, (mmu_hash_lock - PAGE_OFFSET)@ha
     addi    r9, r9, (mmu_hash_lock - PAGE_OFFSET)@l
-    lwz    r8,TASK_CPU(r2)
+    tophys    (r8, r2)
+    lwz    r8, TASK_CPU(r8)
     oris    r8,r8,9
 10:    lwarx    r0,0,r9
     cmpi    0,r0,0
Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#5 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=203125

--- Comment #7 from Christophe Leroy ([email protected]) ---

Quoted 4 lines · On 05/09/2019 10:05 AM, [email protected] wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=203125

Christophe Leroy ([email protected]) changed:

Quoted 8 lines

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #5 from Christophe Leroy ([email protected]) --- Apparently, MSR DR is not sent and DAR has value 0xc0090654, meaning that a virt address tries to get accessed while in real mode.

Could you try the patch below:

(quoted diff) +0 -0

b/arch/powerpc/mm/book3s32/hash_low.S
index e27792d0b744..8366c2abeafc 100644

arch/powerpc/mm/book3s32/hash_low.S +2 -1
@@ -539,7 +539,8 @@ _GLOBAL(flush_hash_pages)
  #ifdef CONFIG_SMP
        lis     r9, (mmu_hash_lock - PAGE_OFFSET)@ha
        addi    r9, r9, (mmu_hash_lock - PAGE_OFFSET)@l
-       lwz     r8,TASK_CPU(r2)
+       tophys  (r8, r2)
+       lwz     r8, TASK_CPU(r8)
        oris    r8,r8,9
  10:   lwarx   r0,0,r9
        cmpi    0,r0,0

Christophe

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#6 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=203125

--- Comment #8 from Erhard F. ([email protected]) ---
I tried to apply the patch on top of 5.1.0 but it did not work out 'cause there is no arch/powerpc/mm/book3s32/hash_low.S. The correct file on my system seemed arch/powerpc/mm/hash_low_32.S, but changing the path in the patch did not work either.

What actually did work was manually applying your proposed change in arch/powerpc/mm/book3s32/hash_low.S! Now the G4 boots up fine with 5.1.0 as it did with 5.0.x.

Many thanks for the fix!

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#7 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=203125

--- Comment #9 from Erhard F. ([email protected]) --- @Christophe: Oops, accidentally I trashed your last comment. Sorry! This patch didn't apply either. There is no book3s32 directory in my linux-stable tree, the hash_*.S files are directly in mm/

But does not matter, your code change works!

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#8 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=203125

--- Comment #10 from Christophe Leroy ([email protected]) --- Thanks for testing.

Proposed patch at https://patchwork.ozlabs.org/patch/1097492/

Note that the backport to stable should be straight forward as the directory and file name changes are in following commit:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=17312f258cf6eb584f276ad592972ade7e16e318

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#9 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=203125

Erhard F. ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |CODE_FIX

--- Comment #11 from Erhard F. ([email protected]) --- Your fix landed in 5.1.4 stable now, the G4 boots fine again. Thanks!

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.