Kernel 5.0

AmigaOne X1000 platform specific issues related to Linux only.
User avatar
xeno74
Posts: 5604
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.0

Post by xeno74 »

Hi All,

I compiled kernels for the X5000 and X1000 from Christoph's branch 'powerpc-dma.6' today.

Gitweb: powerpc-dma.6

Code: Select all

git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a
The X1000 and X5000 boot but unfortunately the P.A. Semi Ethernet doesn't work.

Error messages (X1000):

Code: Select all

[   17.371736] pci 0000:00:1a.0: overflow 0x00000002691bf802+1646 of DMA mask ffffffff bus mask 0
[   17.371760] WARNING: CPU: 0 PID: 2496 at kernel/dma/direct.c:43 .dma_direct_map_page+0x11c/0x200
[   17.371762] Modules linked in:
[   17.371769] CPU: 0 PID: 2496 Comm: NetworkManager Not tainted 5.0.0-rc4-3_A-EON_AmigaOne_X1000_Nemo-54580-g8d7a724-dirty #2
[   17.371772] NIP:  c00000000010395c LR: c000000000103a30 CTR: c000000000726f70
[   17.371775] REGS: c00000026900e9a0 TRAP: 0700   Not tainted  (5.0.0-rc4-3_A-EON_AmigaOne_X1000_Nemo-54580-g8d7a724-dirty)
[   17.371777] MSR:  9000000000029032 <SF,HV,EE,ME,IR,DR,RI>  CR: 24002222  XER: 20000000
[   17.371786] IRQMASK: 0 
               GPR00: c000000000103a30 c00000026900ec30 c000000001923f00 0000000000000052 
               GPR04: c00000026f206778 c00000026f20d458 0000000000000000 0000000000000346 
               GPR08: 0000000000000007 0000000000000000 0000000000000000 0000000000000010 
               GPR12: 0000000022002444 c000000001b10000 0000000000000000 0000000000000000 
               GPR16: 0000000010382410 0000000000000000 0000000000000000 c00000026bd9d820 
               GPR20: 0000000000000000 c00000026919c000 0000000000000000 0000000000000000 
               GPR24: 0000000000000800 c000000269190000 c0000002692a4180 c000000269190000 
               GPR28: c000000277ada1c8 000000000000066e c00000026d3c68b0 0000000000000802 
[   17.371823] NIP [c00000000010395c] .dma_direct_map_page+0x11c/0x200
[   17.371827] LR [c000000000103a30] .dma_direct_map_page+0x1f0/0x200
[   17.371829] Call Trace:
[   17.371833] [c00000026900ec30] [c000000000103a30] .dma_direct_map_page+0x1f0/0x200 (unreliable)
[   17.371840] [c00000026900ecd0] [c00000000099b7ec] .pasemi_mac_replenish_rx_ring+0x12c/0x2a0
[   17.371846] [c00000026900eda0] [c00000000099dc64] .pasemi_mac_open+0x384/0x7c0
[   17.371853] [c00000026900ee40] [c000000000c6f484] .__dev_open+0x134/0x1e0
[   17.371858] [c00000026900eee0] [c000000000c6f9ec] .__dev_change_flags+0x1bc/0x210
[   17.371863] [c00000026900ef90] [c000000000c6fa88] .dev_change_flags+0x48/0xa0
[   17.371869] [c00000026900f030] [c000000000c8c88c] .do_setlink+0x3dc/0xf60
[   17.371875] [c00000026900f1b0] [c000000000c8dd84] .__rtnl_newlink+0x5e4/0x900
[   17.371880] [c00000026900f5f0] [c000000000c8e10c] .rtnl_newlink+0x6c/0xb0
[   17.371885] [c00000026900f680] [c000000000c89838] .rtnetlink_rcv_msg+0x2e8/0x3d0
[   17.371891] [c00000026900f760] [c000000000cc0f90] .netlink_rcv_skb+0x120/0x170
[   17.371896] [c00000026900f820] [c000000000c87318] .rtnetlink_rcv+0x28/0x40
[   17.371901] [c00000026900f8a0] [c000000000cc03f8] .netlink_unicast+0x208/0x2f0
[   17.371906] [c00000026900f950] [c000000000cc09a8] .netlink_sendmsg+0x348/0x460
[   17.371911] [c00000026900fa30] [c000000000c38774] .sock_sendmsg+0x44/0x70
[   17.371915] [c00000026900fab0] [c000000000c3a79c] .___sys_sendmsg+0x30c/0x320
[   17.371920] [c00000026900fca0] [c000000000c3c3b4] .__sys_sendmsg+0x74/0xf0
[   17.371926] [c00000026900fd90] [c000000000cb4da0] .__se_compat_sys_sendmsg+0x40/0x60
[   17.371932] [c00000026900fe20] [c00000000000a21c] system_call+0x5c/0x70
[   17.371934] Instruction dump:
[   17.371937] 60000000 f8610070 3d20ffff 6129fffe 79290020 e8e70000 7fa74840 409d00b8 
[   17.371946] 3d420001 892acb59 2f890000 419e00b8 <0fe00000> 382100a0 3860ffff e8010010 
[   17.371954] ---[ end trace a81f3c344f625f76 ]---
[   17.396654] IPv6: ADDRCONF(NETDEV_UP): enp0s20f3: link is not ready
Additionally, Xorg doesn't start on a virtual e5500 QEMU machine anymore. I tested with the following QEMU command:

Code: Select all

./qemu-system-ppc64 -M ppce500 -cpu e5500 -m 2048 -kernel /home/christian/Downloads/vmlinux-5.0-rc4-3-AmigaOne_X1000_X5000/X5000_and_QEMU_e5500/uImage-5.0 -drive format=raw,file=/home/christian/Downloads/Fienix-Beta120418.img,index=0,if=virtio -nic user,model=e1000 -append "rw root=/dev/vda" -device virtio-vga -device virtio-mouse-pci -device virtio-keyboard-pci -usb -soundhw es1370 -smp 4
Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
tbreeden
Posts: 160
Joined: Sat Jun 18, 2011 12:57 am
Location: Charlottesville, VA, USA
Contact:

Re: Kernel 5.0

Post by tbreeden »

kernel 5.0-rc4 running well here.

Tom
Screenshot from 2019-02-01 02-44-20.png

User avatar
xeno74
Posts: 5604
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.0

Post by xeno74 »

tbreeden wrote:kernel 5.0-rc4 running well here.

Tom
Hi Tom,

Many thanks for testing the RC4! :-)

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

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 5604
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.0

Post by xeno74 »

Christoph Hellwig wrote: Oh. Can you try with just the next one and then two patches applied
over the working setup? That is first:

http://git.infradead.org/users/hch/misc ... 4f00cdf65b

then also with:

http://git.infradead.org/users/hch/misc ... f8602dde4d
Gitweb: powerpc-dma.6

Next step: b50f42f0fe12965ead395c76bcb6a14f00cdf65b (powerpc/dma: use the dma_direct mapping routines)

Code: Select all

git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a

Code: Select all

git checkout b50f42f0fe12965ead395c76bcb6a14f00cdf65b
Results: The X1000 and X5000 boot but unfortunately the P.A. Semi Ethernet doesn't work.

Edit: X1000 dmesg: dmesg_X1000_with_DMA_updates.txt
Last edited by xeno74 on Mon Feb 04, 2019 1:02 pm, edited 1 time in total.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 5604
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 4.21

Post by xeno74 »

http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 5604
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.0

Post by xeno74 »

Christoph Hellwig wrote: It seems like the pasemi driver fails to set a DMA mask, but seems
otherwise 64-bit DMA capable. The old PPC code didn't verify the
dma mask during the map operations, but the x86-derived generic
code does.

This patch just sets the DMA mask.

Olof: does this look ok? The DMA device seems to not directly
bound by the net driver, but not really used by anything else in tree
either..
pasemi_mac.patch:

Code: Select all

diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c
index d21041554507..d98bd447c536 100644
--- a/drivers/net/ethernet/pasemi/pasemi_mac.c
+++ b/drivers/net/ethernet/pasemi/pasemi_mac.c
@@ -1716,6 +1716,7 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		err = -ENODEV;
 		goto out;
 	}
+	dma_set_mask(&mac->dma_pdev->dev, DMA_BIT_MASK(32));
 
 	mac->iob_pdev = pci_get_device(PCI_VENDOR_ID_PASEMI, 0xa001, NULL);
 	if (!mac->iob_pdev) {

Code: Select all

git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a
I patched the source code from the Git powerpc-dma.6 with the pasemi_mac patch today. Unfortunately the P.A. Semi Ethernet doesn't work with the patched Git kernel.

After that I tried it with the patch applied over the working setup again.

Code: Select all

git checkout b50f42f0fe12965ead395c76bcb6a14f00cdf65b
(powerpc/dma: use the dma_direct mapping routines)

I patched 'powerpc/dma: use the dma_direct mapping routines' with the pasemi_mac patch but unfortunately after compiling and booting, the P.A. Semi Ethernet doesn't work either.

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

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 5604
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.0

Post by xeno74 »

Christoph Hellwig wrote: But I just noticed I sent you a wrong patch - the pasemi ethernet
should set a 64-bit DMA mask, not 32-bit. Updated version below,
32-bit would just keep the previous status quo.
New pasemi_mac.patch:

Code: Select all

commit 6c8f88045dee35933337b9ce2ea5371eee37073a
Author: Christoph Hellwig <hch@lst.de>
Date:   Mon Feb 4 13:38:22 2019 +0100

   pasemi WIP

diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c
index 8a31a02c9f47..2d7d1589490a 100644
--- a/drivers/net/ethernet/pasemi/pasemi_mac.c
+++ b/drivers/net/ethernet/pasemi/pasemi_mac.c
@@ -1716,6 +1716,7 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
       err = -ENODEV;
       goto out;
   }
+    dma_set_mask(&mac->dma_pdev->dev, DMA_BIT_MASK(64));

   mac->iob_pdev = pci_get_device(PCI_VENDOR_ID_PASEMI, 0xa001, NULL);
   if (!mac->iob_pdev) {

Code: Select all

git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 5604
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.0

Post by xeno74 »

Hi All,

Christoph's new patch fixes the problems with the P.A. Semi Ethernet! :-)

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

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 5604
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.0

Post by xeno74 »

Christoph Hellwig wrote: Thanks a lot once again for testing!

Now can you test with this patch and the whole series?

I've updated the powerpc-dma.6 branch to include this fix.
Gitweb: powerpc-dma.6

Code: Select all

git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 5604
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 4.21

Post by xeno74 »

xeno74 wrote:Hi All,

Here is the RC5 of kernel 5.0 for testing.

New:
Download: vmlinux-5.0-rc5-AmigaOne_X1000_X5000.tar.gz

Screenshot of Fienix with the RC5 of kernel 5.0:

Image

Please test it.

Thanks,
Christian
Please test the RC5.

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

Running Linux on AmigaONEs can require some tinkering.

Post Reply