AmigaOne X5000 platform specific issues related to Linux only.
xeno74
Posts: 10710 Joined: Fri Mar 23, 2012 7:58 am
Contact:
Post
by xeno74 » Sun Aug 09, 2020 4:08 pm
Hi All,
I compiled the latest Git kernel today. The issue with Xorg is solved.
The X5000 boots and works with the latest Git kernel. Unfortunately the X1000 doesn't boot anymore. It can't initialize the graphics card anymore.
I bisected today.
Code: Select all
git bisect good bcf876870b95592b52519ed4aafcf9d95999bc9c
(Good: Linux 5.8)
Code: Select all
git bisect bad 7b9de97711225559af213dc52b6ea883ef1ea7a8
(Bad: powerpc/ptrace: Fix build error in pkey_get() -- 2020-08-07 18:27:26 -0700)
git bisect good
git bisect good
git bisect good
git bisect bad
git bisect bad
git bisect bad
git bisect good
git bisect bad
git bisect good
git bisect bad
git bisect good
git bisect good
git bisect good
Result:
powerpc/book3s64/pkeys: Simplify pkey disable branch (a4678d4b477c3d2901f101986ca01406f3b7eaea) is the first bad commit.
Code: Select all
a4678d4b477c3d2901f101986ca01406f3b7eaea is the first bad commit
commit a4678d4b477c3d2901f101986ca01406f3b7eaea
Author: Aneesh Kumar K.V <[email protected] >
Date: Thu Jul 9 08:59:32 2020 +0530
powerpc/book3s64/pkeys: Simplify pkey disable branch
Make the default value FALSE (pkey enabled) and set to TRUE when we
find the total number of keys supported to be zero.
Signed-off-by: Aneesh Kumar K.V <[email protected] >
Signed-off-by: Michael Ellerman <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
:040000 040000 ba5ec72c45ced2ec3059d47db0ab493e63c3d07c 7d11c97b991b194aa834ef0ea0967c07710dbc06 M arch
Unfortunately I wasn't able to revert the first bad commit.
The first bad commit depends on many other commits, which unfortunately I don't know. I tried to remove the modifications of the files from the first bad commit but without any success. There are just too many dependencies.
I reverted the commit
selftests/powerpc: Fix pkey syscall redefinitions and compiled a new kernel but without any success.
Christian
xeno74
Posts: 10710 Joined: Fri Mar 23, 2012 7:58 am
Contact:
Post
by xeno74 » Sun Aug 09, 2020 5:54 pm
Aneesh Kumar has released a patch because of the X1000 boot issue.
Code: Select all
commit 919a177bcdaf1eaeaeecc0d0f50a688629d7b5df
Author: Aneesh Kumar K.V <[email protected] >
Date: Sun Aug 9 20:37:38 2020 +0530
powerpc/pkeys: Fix boot failures with Nemo board (A-EON AmigaOne X1000)
On p6 and before we should avoid updating UAMOR SPRN. This resulted
in boot failure on Nemo board.
Fixes: 269e829f48a0 ("powerpc/book3s64/pkey: Disable pkey on POWER6 and before")
Reported-by: Christian Zigotzky <[email protected] >
Signed-off-by: Aneesh Kumar K.V <[email protected] >
diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c
index 69a6b87f2bb4..b1d091a97611 100644
--- a/arch/powerpc/mm/book3s64/pkeys.c
+++ b/arch/powerpc/mm/book3s64/pkeys.c
@@ -73,12 +73,6 @@ static int scan_pkey_feature(void)
if (early_radix_enabled())
return 0;
- /*
- * Only P7 and above supports SPRN_AMR update with MSR[PR] = 1
- */
- if (!early_cpu_has_feature(CPU_FTR_ARCH_206))
- return 0;
-
ret = of_scan_flat_dt(dt_scan_storage_keys, &pkeys_total);
if (ret == 0) {
/*
@@ -124,6 +118,12 @@ void __init pkey_early_init_devtree(void)
__builtin_popcountl(ARCH_VM_PKEY_FLAGS >> VM_PKEY_SHIFT)
!= (sizeof(u64) * BITS_PER_BYTE));
+ /*
+ * Only P7 and above supports SPRN_AMR update with MSR[PR] = 1
+ */
+ if (!early_cpu_has_feature(CPU_FTR_ARCH_206))
+ return;
+
/* scan the device tree for pkey feature */
pkeys_total = scan_pkey_feature();
if (!pkeys_total)
If this patch works then we can release the alpha3 tomorrow.
xeno74
Posts: 10710 Joined: Fri Mar 23, 2012 7:58 am
Contact:
Post
by xeno74 » Mon Aug 10, 2020 12:34 pm
X1000: There were some other problems like not displaying boot messages or only one CPU core so Aneesh has released a new patch.
Code: Select all
On p6 and before we should avoid updating UAMOR SPRN. This resulted
in boot failure on Nemo board.
Fixes: 269e829f48a0 ("powerpc/book3s64/pkey: Disable pkey on POWER6 and before")
Reported-by: Christian Zigotzky <[email protected] >
Signed-off-by: Aneesh Kumar K.V <[email protected] >
---
arch/powerpc/mm/book3s64/hash_utils.c | 5 ++---
arch/powerpc/mm/book3s64/pkeys.c | 12 ++++++------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/mm/book3s64/hash_utils.c b/arch/powerpc/mm/book3s64/hash_utils.c
index 1478fceeb683..1da9dbba9217 100644
--- a/arch/powerpc/mm/book3s64/hash_utils.c
+++ b/arch/powerpc/mm/book3s64/hash_utils.c
@@ -1115,9 +1115,8 @@ void hash__early_init_mmu_secondary(void)
&& cpu_has_feature(CPU_FTR_HVMODE))
tlbiel_all();
-#ifdef CONFIG_PPC_MEM_KEYS
- mtspr(SPRN_UAMOR, default_uamor);
-#endif
+ if (IS_ENABLED(CONFIG_PPC_MEM_KEYS) && mmu_has_feature(MMU_FTR_PKEY))
+ mtspr(SPRN_UAMOR, default_uamor);
}
#endif /* CONFIG_SMP */
diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c
index 69a6b87f2bb4..b1d091a97611 100644
--- a/arch/powerpc/mm/book3s64/pkeys.c
+++ b/arch/powerpc/mm/book3s64/pkeys.c
@@ -73,12 +73,6 @@ static int scan_pkey_feature(void)
if (early_radix_enabled())
return 0;
- /*
- * Only P7 and above supports SPRN_AMR update with MSR[PR] = 1
- */
- if (!early_cpu_has_feature(CPU_FTR_ARCH_206))
- return 0;
-
ret = of_scan_flat_dt(dt_scan_storage_keys, &pkeys_total);
if (ret == 0) {
/*
@@ -124,6 +118,12 @@ void __init pkey_early_init_devtree(void)
__builtin_popcountl(ARCH_VM_PKEY_FLAGS >> VM_PKEY_SHIFT)
!= (sizeof(u64) * BITS_PER_BYTE));
+ /*
+ * Only P7 and above supports SPRN_AMR update with MSR[PR] = 1
+ */
+ if (!early_cpu_has_feature(CPU_FTR_ARCH_206))
+ return;
+
/* scan the device tree for pkey feature */
pkeys_total = scan_pkey_feature();
if (!pkeys_total)
--
2.26.2
Skateman
Posts: 955 Joined: Thu Aug 10, 2017 9:36 pm
Location: The Netherlands
Post
by Skateman » Mon Aug 10, 2020 1:06 pm
Pfff Christian,
This is a painfull start for a new kernel..
AmigaOne X5000 -> 2GHz / 16GB RAM / Radeon RX 570 / Radeon X1950 / M-Audio 5.1 -> AmigaOS / Linux
Amiga 1200 -> Recapped / 68ec020 ACA 1221ec / CF HDD / RetroNET connected to the world
Vampire 4SA - RPi4 Running AmiKitXE Full
xeno74
Posts: 10710 Joined: Fri Mar 23, 2012 7:58 am
Contact:
Post
by xeno74 » Mon Aug 10, 2020 1:43 pm
Skateman wrote: Mon Aug 10, 2020 1:06 pm
Pfff Christian,
This is a painfull start for a new kernel..
Yes, that's right.
xeno74
Posts: 10710 Joined: Fri Mar 23, 2012 7:58 am
Contact:
Post
by xeno74 » Mon Aug 10, 2020 2:50 pm
It seems there is an other issue but only in virtual e5500 QEMU machines (ppce500):
Code: Select all
virtio_gpu virtio0: swiotlb buffer is full (sz: 4096 bytes), total 0 (slots), used 0 (slots)
BUG: Kernel NULL pointer dereference on read at 0x00000010
Faulting instruction address: 0xc0000000000c7324
Oops: Kernel access of bad area, sig: 11 [#1]
BE PAGE_SIZE=4K PREEMPT SMP NR_CPUS=4 QEMU e500
Modules linked in:
CPU: 2 PID: 1678 Comm: kworker/2:2 Not tainted 5.9-a3_A-EON_X5000-11735-g06a81c1c7db9-dirty #1
Workqueue: events .virtio_gpu_dequeue_ctrl_func
NIP: c0000000000c7324 LR: c0000000000c72e4 CTR: c000000000462930
REGS: c00000003dba75e0 TRAP: 0300 Not tainted (5.9-a3_A-EON_X5000-11735-g06a81c1c7db9-dirty)
MSR: 0000000090029000 <CE,EE,ME> CR: 24002288 XER: 00000000
DEAR: 0000000000000010 ESR: 0000000000000000 IRQMASK: 0
GPR00: c0000000000c6188 c00000003dba7870 c0000000017f2300 c00000003d893010
GPR04: 0000000000000000 0000000000000001 0000000000000000 0000000000000000
GPR08: 0000000000000000 0000000000000000 0000000000000000 7f7f7f7f7f7f7f7f
GPR12: 0000000024002284 c00000003fff9200 c00000000008c3a0 c0000000061566c0
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR24: 0000000000000001 0000000000110000 0000000000000000 0000000000000000
GPR28: c00000003d893010 0000000000000000 0000000000000000 c00000003d893010
NIP [c0000000000c7324] .dma_direct_unmap_sg+0x4c/0xd8
LR [c0000000000c72e4] .dma_direct_unmap_sg+0xc/0xd8
Call Trace:
[c00000003dba7870] [c00000003dba7950] 0xc00000003dba7950 (unreliable)
[c00000003dba7920] [c0000000000c6188] .dma_unmap_sg_attrs+0x5c/0x98
[c00000003dba79d0] [c0000000005cd438] .drm_gem_shmem_free_object+0x98/0xcc
[c00000003dba7a50] [c0000000006af5b4] .virtio_gpu_cleanup_object+0xc8/0xd4
[c00000003dba7ad0] [c0000000006ad3bc] .virtio_gpu_cmd_unref_cb+0x1c/0x30
[c00000003dba7b40] [c0000000006adab8] .virtio_gpu_dequeue_ctrl_func+0x208/0x28c
[c00000003dba7c10] [c000000000086b70] .process_one_work+0x1a4/0x258
[c00000003dba7cb0] [c0000000000870f4] .worker_thread+0x214/0x284
[c00000003dba7d70] [c00000000008c4f0] .kthread+0x150/0x158
[c00000003dba7e20] [c00000000000082c] .ret_from_kernel_thread+0x58/0x60
Instruction dump:
f821ff51 7cb82b78 7cdb3378 4e000000 7cfa3b78 3bc00000 7f9ec000 41fc0014
382100b0 81810008 7d808120 48bc1ba8 <e93d0010> ebfc0248 833d0018 7fff4850
---[ end trace f28d194d9f0955a8 ]---
virtio_gpu virtio0: swiotlb buffer is full (sz: 4096 bytes), total 0 (slots), used 0 (slots)
virtio_gpu virtio0: swiotlb buffer is full (sz: 16384 bytes), total 0 (slots), used 0 (slots)
QEMU command:
Code: Select all
qemu-system-ppc64 -M ppce500 -cpu e5500 -enable-kvm -m 1024 -kernel uImage -drive format=raw,file=fienix-soar_3.0-2020608-net.img,index=0,if=virtio -nic user,model=e1000 -append "rw root=/dev/vda2" -device virtio-vga -device virtio-mouse-pci -device virtio-keyboard-pci -device pci-ohci,id=newusb -device usb-audio,bus=newusb.0 -smp 4
Roland
Posts: 873 Joined: Tue May 02, 2017 8:23 am
Post
by Roland » Mon Aug 10, 2020 8:04 pm
Kernel 5.9 alpha3 works here with Ubuntu and Fienix. Onboard ethernet still needs unplug/replug.
- Roland -
Skateman
Posts: 955 Joined: Thu Aug 10, 2017 9:36 pm
Location: The Netherlands
Post
by Skateman » Mon Aug 10, 2020 8:19 pm
Kernel 5.9 A3 up and running on my AmigaOne X5000
Big picture
http://www.skateman.nl/wp-content/uploa ... 221725.png
AmigaOne X5000 -> 2GHz / 16GB RAM / Radeon RX 570 / Radeon X1950 / M-Audio 5.1 -> AmigaOS / Linux
Amiga 1200 -> Recapped / 68ec020 ACA 1221ec / CF HDD / RetroNET connected to the world
Vampire 4SA - RPi4 Running AmiKitXE Full