Kernel 5.13

AmigaOne X5000 platform specific issues related to Linux only.
Post Reply
User avatar
xeno74
Posts: 7022
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.13

Post by xeno74 »

Christophe wrote: Can you bisect between 5.13-rc1 and the top of the 'for_christian' branch to find the first 'good' commit ?

Take care it is an "up side down" bisect, a 'good' is one that does _not_ work and a 'bad' is a commit that works.

git bisect start
git bisect bad 1c8f441f1485
git bisect good 6efb943b8616

Christophe
  1. Code: Select all

    git bisect start
  2. Code: Select all

    git bisect bad 1c8f441f1485
  3. Code: Select all

    git bisect good 6efb943b8616
  4. Output: Bisecting: 5 revisions left to test after this (roughly 3 steps)
    [d66b1d1aab0c1caad11eca417f515b86ec0bebe9] Revert "powerpc/64e/interrupt: Use new interrupt context tracking scheme"
    Result:

    Code: Select all

    arch/powerpc/kernel/interrupt.o: In function `.syscall_exit_prepare':
    interrupt.c:(.text+0x278): undefined reference to `.schedule_user'
    arch/powerpc/kernel/interrupt.o: In function `.interrupt_exit_user_prepare':
    interrupt.c:(.text+0x340): undefined reference to `.schedule_user'
    Makefile:1191: recipe for target 'vmlinux' failed
    make: *** [vmlinux] Error 1
    
Christophe wrote: Ah yes, I remember this problem.

Can you select CONFIG_VIRT_CPU_ACCOUNTING_GEN in your configuration ?

Otherwise, I can try to fix the branch.

Christophe
I selected this. After that it compiles.
  1. git bisect good Xorg restarts again and again
    Output: [f9aa0ac1e9e82b60401ad567bdabc30598325bc1] Revert "powerpc/64e/interrupt: use new interrupt return"
  2. git bisect good Xorg restarts again and again
    Output: [cd6d259a14704741bf0cd1dcadb84c0de22d7f77] Revert "powerpc/64e/interrupt: always save nvgprs on interrupt"
  3. git bisect bad Xorg works
    Output: [9bfa20ef2ae54d3b9088dfbcde4ef97062cf5ef2] Revert "powerpc/interrupt: update common interrupt code for"
  4. git bisect good Xorg restarts again and again
    Output:

    Code: Select all

    cd6d259a14704741bf0cd1dcadb84c0de22d7f77 is the first bad commit
    commit cd6d259a14704741bf0cd1dcadb84c0de22d7f77
    Author: Christophe Leroy <christophe.leroy@csgroup.eu>
    Date:   Thu May 13 09:52:06 2021 +0000
    
        Revert "powerpc/64e/interrupt: always save nvgprs on interrupt"
        
        This reverts commit 4228b2c3d20e9f80b847f809c38e6cf82864fa50.
    
    :040000 040000 156542c857ad72776b69bb67b2f244afeeb7abd3 92ea86ed097fce16238b0c2f2b343473894e4e8e M	arch
    
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 7022
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.13

Post by xeno74 »

The first bad commit: 4228b2c3d20e9f80b847f809c38e6cf82864fa50 (powerpc/64e/interrupt: always save nvgprs on interrupt)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 7022
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.13

Post by xeno74 »

Nick wrote: Thank you both very much for chasing this down.

I think I see the problem, it's clobbering r14 and r15 for some
interrupts. Something like this is required, I'll give it more
review and testing though.

Thanks,
Nick

Code: Select all

diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 7c3654b0d0f4..b91ef04f1ce2 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -535,6 +535,10 @@ __end_interrupts:
 				PROLOG_ADDITION_2REGS)
 	mfspr	r14,SPRN_DEAR
 	mfspr	r15,SPRN_ESR
+	std	r14,_DAR(r1)
+	std	r15,_DSISR(r1)
+	ld	r14,PACA_EXGEN+EX_R14(r13)
+	ld	r15,PACA_EXGEN+EX_R15(r13)
 	EXCEPTION_COMMON(0x300)
 	b	storage_fault_common
 
@@ -544,6 +548,10 @@ __end_interrupts:
 				PROLOG_ADDITION_2REGS)
 	li	r15,0
 	mr	r14,r10
+	std	r14,_DAR(r1)
+	std	r15,_DSISR(r1)
+	ld	r14,PACA_EXGEN+EX_R14(r13)
+	ld	r15,PACA_EXGEN+EX_R15(r13)
 	EXCEPTION_COMMON(0x400)
 	b	storage_fault_common
 
@@ -557,6 +565,10 @@ __end_interrupts:
 				PROLOG_ADDITION_2REGS)
 	mfspr	r14,SPRN_DEAR
 	mfspr	r15,SPRN_ESR
+	std	r14,_DAR(r1)
+	std	r15,_DSISR(r1)
+	ld	r14,PACA_EXGEN+EX_R14(r13)
+	ld	r15,PACA_EXGEN+EX_R15(r13)
 	EXCEPTION_COMMON(0x600)
 	b	alignment_more	/* no room, go out of line */
 
@@ -565,10 +577,10 @@ __end_interrupts:
 	NORMAL_EXCEPTION_PROLOG(0x700, BOOKE_INTERRUPT_PROGRAM,
 				PROLOG_ADDITION_1REG)
 	mfspr	r14,SPRN_ESR
-	EXCEPTION_COMMON(0x700)
 	std	r14,_DSISR(r1)
-	addi	r3,r1,STACK_FRAME_OVERHEAD
 	ld	r14,PACA_EXGEN+EX_R14(r13)
+	EXCEPTION_COMMON(0x700)
+	addi	r3,r1,STACK_FRAME_OVERHEAD
 	bl	program_check_exception
 	REST_NVGPRS(r1)
 	b	interrupt_return
@@ -725,11 +737,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 	 * normal exception
 	 */
 	mfspr	r14,SPRN_DBSR
-	EXCEPTION_COMMON_CRIT(0xd00)
 	std	r14,_DSISR(r1)
-	addi	r3,r1,STACK_FRAME_OVERHEAD
 	ld	r14,PACA_EXCRIT+EX_R14(r13)
 	ld	r15,PACA_EXCRIT+EX_R15(r13)
+	EXCEPTION_COMMON_CRIT(0xd00)
+	addi	r3,r1,STACK_FRAME_OVERHEAD
 	bl	DebugException
 	REST_NVGPRS(r1)
 	b	interrupt_return
@@ -796,11 +808,11 @@ kernel_dbg_exc:
 	 * normal exception
 	 */
 	mfspr	r14,SPRN_DBSR
-	EXCEPTION_COMMON_DBG(0xd08)
 	std	r14,_DSISR(r1)
-	addi	r3,r1,STACK_FRAME_OVERHEAD
 	ld	r14,PACA_EXDBG+EX_R14(r13)
 	ld	r15,PACA_EXDBG+EX_R15(r13)
+	EXCEPTION_COMMON_DBG(0xd08)
+	addi	r3,r1,STACK_FRAME_OVERHEAD
 	bl	DebugException
 	REST_NVGPRS(r1)
 	b	interrupt_return
@@ -931,11 +943,7 @@ masked_interrupt_book3e_0x2c0:
  * original values stashed away in the PACA
  */
 storage_fault_common:
-	std	r14,_DAR(r1)
-	std	r15,_DSISR(r1)
 	addi	r3,r1,STACK_FRAME_OVERHEAD
-	ld	r14,PACA_EXGEN+EX_R14(r13)
-	ld	r15,PACA_EXGEN+EX_R15(r13)
 	bl	do_page_fault
 	b	interrupt_return
 
@@ -944,11 +952,7 @@ storage_fault_common:
  * continues here.
  */
 alignment_more:
-	std	r14,_DAR(r1)
-	std	r15,_DSISR(r1)
 	addi	r3,r1,STACK_FRAME_OVERHEAD
-	ld	r14,PACA_EXGEN+EX_R14(r13)
-	ld	r15,PACA_EXGEN+EX_R15(r13)
 	bl	alignment_exception
 	REST_NVGPRS(r1)
 	b	interrupt_return
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 7022
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.13

Post by xeno74 »

xeno74 wrote: Fri May 14, 2021 12:20 am

Code: Select all

diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 7c3654b0d0f4..b91ef04f1ce2 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -535,6 +535,10 @@ __end_interrupts:
 				PROLOG_ADDITION_2REGS)
 	mfspr	r14,SPRN_DEAR
 	mfspr	r15,SPRN_ESR
+	std	r14,_DAR(r1)
+	std	r15,_DSISR(r1)
+	ld	r14,PACA_EXGEN+EX_R14(r13)
+	ld	r15,PACA_EXGEN+EX_R15(r13)
 	EXCEPTION_COMMON(0x300)
 	b	storage_fault_common
 
@@ -544,6 +548,10 @@ __end_interrupts:
 				PROLOG_ADDITION_2REGS)
 	li	r15,0
 	mr	r14,r10
+	std	r14,_DAR(r1)
+	std	r15,_DSISR(r1)
+	ld	r14,PACA_EXGEN+EX_R14(r13)
+	ld	r15,PACA_EXGEN+EX_R15(r13)
 	EXCEPTION_COMMON(0x400)
 	b	storage_fault_common
 
@@ -557,6 +565,10 @@ __end_interrupts:
 				PROLOG_ADDITION_2REGS)
 	mfspr	r14,SPRN_DEAR
 	mfspr	r15,SPRN_ESR
+	std	r14,_DAR(r1)
+	std	r15,_DSISR(r1)
+	ld	r14,PACA_EXGEN+EX_R14(r13)
+	ld	r15,PACA_EXGEN+EX_R15(r13)
 	EXCEPTION_COMMON(0x600)
 	b	alignment_more	/* no room, go out of line */
 
@@ -565,10 +577,10 @@ __end_interrupts:
 	NORMAL_EXCEPTION_PROLOG(0x700, BOOKE_INTERRUPT_PROGRAM,
 				PROLOG_ADDITION_1REG)
 	mfspr	r14,SPRN_ESR
-	EXCEPTION_COMMON(0x700)
 	std	r14,_DSISR(r1)
-	addi	r3,r1,STACK_FRAME_OVERHEAD
 	ld	r14,PACA_EXGEN+EX_R14(r13)
+	EXCEPTION_COMMON(0x700)
+	addi	r3,r1,STACK_FRAME_OVERHEAD
 	bl	program_check_exception
 	REST_NVGPRS(r1)
 	b	interrupt_return
@@ -725,11 +737,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 	 * normal exception
 	 */
 	mfspr	r14,SPRN_DBSR
-	EXCEPTION_COMMON_CRIT(0xd00)
 	std	r14,_DSISR(r1)
-	addi	r3,r1,STACK_FRAME_OVERHEAD
 	ld	r14,PACA_EXCRIT+EX_R14(r13)
 	ld	r15,PACA_EXCRIT+EX_R15(r13)
+	EXCEPTION_COMMON_CRIT(0xd00)
+	addi	r3,r1,STACK_FRAME_OVERHEAD
 	bl	DebugException
 	REST_NVGPRS(r1)
 	b	interrupt_return
@@ -796,11 +808,11 @@ kernel_dbg_exc:
 	 * normal exception
 	 */
 	mfspr	r14,SPRN_DBSR
-	EXCEPTION_COMMON_DBG(0xd08)
 	std	r14,_DSISR(r1)
-	addi	r3,r1,STACK_FRAME_OVERHEAD
 	ld	r14,PACA_EXDBG+EX_R14(r13)
 	ld	r15,PACA_EXDBG+EX_R15(r13)
+	EXCEPTION_COMMON_DBG(0xd08)
+	addi	r3,r1,STACK_FRAME_OVERHEAD
 	bl	DebugException
 	REST_NVGPRS(r1)
 	b	interrupt_return
@@ -931,11 +943,7 @@ masked_interrupt_book3e_0x2c0:
  * original values stashed away in the PACA
  */
 storage_fault_common:
-	std	r14,_DAR(r1)
-	std	r15,_DSISR(r1)
 	addi	r3,r1,STACK_FRAME_OVERHEAD
-	ld	r14,PACA_EXGEN+EX_R14(r13)
-	ld	r15,PACA_EXGEN+EX_R15(r13)
 	bl	do_page_fault
 	b	interrupt_return
 
@@ -944,11 +952,7 @@ storage_fault_common:
  * continues here.
  */
 alignment_more:
-	std	r14,_DAR(r1)
-	std	r15,_DSISR(r1)
 	addi	r3,r1,STACK_FRAME_OVERHEAD
-	ld	r14,PACA_EXGEN+EX_R14(r13)
-	ld	r15,PACA_EXGEN+EX_R15(r13)
 	bl	alignment_exception
 	REST_NVGPRS(r1)
 	b	interrupt_return
I compiled the RC1 with his patch today and Xorg works without any problems.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 7022
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.13

Post by xeno74 »

The RC1 of kernel 5.13 doesn't boot in a virtual e5500 QEMU machine with KVM HV anymore. I see in the serial console that the uImage doesn't load. I use the following QEMU command for booting:

Code: Select all

qemu-system-ppc64 -M ppce500 -cpu e5500 -enable-kvm -m 1024 -kernel uImage-5.13 -drive format=raw,file=MintPPC32-X5000.img,index=0,if=virtio -netdev user,id=mynet0 -device e1000,netdev=mynet0 -append "rw root=/dev/vda" -device virtio-vga -device virtio-mouse-pci -device virtio-keyboard-pci -device pci-ohci,id=newusb -device usb-audio,bus=newusb.0 -smp 4
The kernel boots without KVM HV.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 7022
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.13

Post by xeno74 »

Hi All,

We are back! The RC1 of kernel 5.13 is available for the X1000 and X5000.

New:
Issue (X5000): The RC1 of kernel 5.13 doesn't boot in a virtual e5500 QEMU machine with KVM HV. If you need a kernel with KVM HV support then please use the stable longterm kernel 5.10.36 instead. I reported this issue to the kernel developers today. Link: [FSL P50x0] KVM HV doesn't work anymore

Download: linux-image-5.13-rc1-X1000_X5000.tar.gz

Image

Please test the RC1.

Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Skateman
Posts: 602
Joined: Thu Aug 10, 2017 8:36 pm
Location: The Netherlands

Re: Kernel 5.13

Post by Skateman »

Kernel 5.13 RC1 up and running on my AmigaOne X5000

Image

Big picture http://www.skateman.nl/wp-content/uploa ... 160750.png

Thank you for all the hard work that was needed to bring us RC1....
AmigaOne X5000 -> 2GHz / 16GB RAM / Radeon R7 250 / M-Audio 5.1 -> AmigaOS 4.1 FE / Ubuntu Linux
Amiga 1200 -> Recapped / 68ec020 ACA 1221ec / CF HDD / RetroNET connected to the world
User avatar
xeno74
Posts: 7022
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.13

Post by xeno74 »

Skateman wrote: Fri May 14, 2021 3:10 pm Kernel 5.13 RC1 up and running on my AmigaOne X5000

Thank you for all the hard work that was needed to bring us RC1....
Thank you for testing the RC1! :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 7022
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.13

Post by xeno74 »

xeno74 wrote: Fri May 14, 2021 9:01 am The RC1 of kernel 5.13 doesn't boot in a virtual e5500 QEMU machine with KVM HV anymore. I see in the serial console that the uImage doesn't load. I use the following QEMU command for booting:

Code: Select all

qemu-system-ppc64 -M ppce500 -cpu e5500 -enable-kvm -m 1024 -kernel uImage-5.13 -drive format=raw,file=MintPPC32-X5000.img,index=0,if=virtio -netdev user,id=mynet0 -device e1000,netdev=mynet0 -append "rw root=/dev/vda" -device virtio-vga -device virtio-mouse-pci -device virtio-keyboard-pci -device pci-ohci,id=newusb -device usb-audio,bus=newusb.0 -smp 4
The kernel boots without KVM HV.
I bisected today.
  1. Code: Select all

    git bisect start
  2. Code: Select all

    git bisect good c70a4be130de333ea079c59da41cc959712bb01c
    (Good: Merge tag 'powerpc-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux)
  3. Code: Select all

    git bisect bad ab159ac569fddf812c0a217d6dbffaa5d93ef88f
    (Bad: Merge tag 'powerpc-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux)
    Output: [152d32aa846835987966fd20ee1143b0e05036a0] Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
  4. git bisect bad ([592fa9532d4e4a7590ca383fd537eb4d53fa585a] Merge branch 'i2c/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux)
  5. git bisect bad ([3919249e80995ed5f125f94d05fcb6171f79e732] ASoC: simple-card-utils: tidyup dev_dbg() to use 1 line)
  6. git bisect good ([2e6a731296be9d356fdccee9fb6ae345dad96438] ALSA: hda/conexant: Re-order CX5066 quirk table entries)
  7. git bisect good ([b71428d7ab333a157216a1d73c8c82a178efada9] Merge tag 'sound-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound)
  8. git bisect bad ([7c49ee9ec54c120a46487b9e4d8172c18f2ea9f6] drm/amdgpu: fix GCR_GENERAL_CNTL offset for dimgrey_cavefish)
  9. git bisect good ([7845d80dda1fd998a34bb1a15ff9aba260a58f32] drm/amdgpu/gmc9: remove dummy read workaround for newer chips)
  10. git bisect good ([12fc11bce6f29a73eb3d61ab4e76a9ece3da1f1d] Merge tag 'drm/tegra/for-5.13-rc1' of ssh://git.freedesktop.org/git/tegra/linux into drm-next)
  11. git bisect good ([63b6c7be3e1f78a2d7e24ea3dde1333ffcc9b2a4] drm/i915: fix an error code in intel_overlay_do_put_image())
  12. git bisect good ([add74e32db0443dfd940d7c3256b9609c65e6149] Merge tag 'amd-drm-next-5.13-2021-04-23' of https://gitlab.freedesktop.org/agd5f/linux into drm-next)
  13. git bisect good ([1cd6b4a04f038eb24fd18c8010e763d1140a9c7a] Merge tag 'drm-intel-next-fixes-2021-04-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next)
  14. git bisect good ([65c61de9d090edb8a3cfb3f45541e268eb2cdb13] Merge tag 'modules-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux)
  15. git bisect bad ([33121347fb1c359bd6e3e680b9f2c6ced5734a81] module: treat exit sections the same as init sections when !CONFIG_MODULE_UNLOAD)
  16. git bisect good
    Result: 65c61de9d090edb8a3cfb3f45541e268eb2cdb13 is the first bad commit.
I was able to revert the first bad commit.

Code: Select all

git revert 65c61de9d090edb8a3cfb3f45541e268eb2cdb13 -m 1
Cheers,
Christian
Last edited by xeno74 on Sat May 15, 2021 1:08 am, edited 10 times in total.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
kilaueabart
Posts: 821
Joined: Mon Mar 05, 2012 2:36 am

Re: Kernel 5.13

Post by kilaueabart »

Imagine that! Kernel Linux 5.13.0-rc1_A-EON_X5000ppc64 up and running!
Post Reply