Kernel 5.0

AmigaOne X1000 platform specific issues related to Linux only.

Re: Kernel 4.21

Postby xeno74 » Sat Dec 08, 2018 8:44 am

Next step: 7ebc44c535f6bd726d553756d38b137acc718443 (powerpc/dma: remove max_direct_dma_addr)

Code: Select all
git checkout 7ebc44c535f6bd726d553756d38b137acc718443


Link to the Git: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.5

OK, the PASEMI onboard ethernet works and the X5000 boots.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.21

Postby xeno74 » Sat Dec 08, 2018 12:16 pm

Next step: e15cd8173ef85e9cc3e2a9c7cc2982f5c1355615 (powerpc/dma: fix an off-by-one in dma_capable)

Code: Select all
git checkout e15cd8173ef85e9cc3e2a9c7cc2982f5c1355615


Link to the Git: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.5

The PASEMI onboard ethernet also works with this commit and the X5000 boots without any problems.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.21

Postby xeno74 » Sun Dec 09, 2018 12:05 pm

Next step: 602307b034734ce77a05da4b99333a2eaf6b6482 (powerpc/fsl_pci: simplify fsl_pci_dma_set_mask)

Code: Select all
git checkout 602307b034734ce77a05da4b99333a2eaf6b6482


Link to the Git: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.5

The PASEMI onboard ethernet works and the X5000 boots.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.21

Postby xeno74 » Sun Dec 09, 2018 4:22 pm

Next step: c1bfcad4b0cf38ce5b00f7ad880d3a13484c123a (dma-mapping, powerpc: simplify the arch dma_set_mask override)

Code: Select all
git checkout c1bfcad4b0cf38ce5b00f7ad880d3a13484c123a


Link to the Git: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.5

Result: No problems with the PASEMI onboard ethernet and with booting the X5000 (P5020 board).
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.21

Postby xeno74 » Sun Dec 09, 2018 9:02 pm

Next step: 64ecd2c160bbef31465c4d34efc0f076a2aad4df (powerpc/dma: use phys_to_dma instead of get_dma_offset)

Code: Select all
git checkout 64ecd2c160bbef31465c4d34efc0f076a2aad4df


Link to the Git: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.5

The P5020 board boots and the PASEMI onboard ethernet works.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.21

Postby xeno74 » Tue Dec 11, 2018 9:06 am

Next step: 977706f9755d2d697aa6f45b4f9f0e07516efeda (powerpc/dma: remove dma_nommu_mmap_coherent)

Code: Select all
git checkout 977706f9755d2d697aa6f45b4f9f0e07516efeda


Link to the Git: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.5

The P5020 board boots and the PASEMI onboard ethernet works.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.21

Postby xeno74 » Tue Dec 11, 2018 4:36 pm

Next step: 7decbcfc656805603ab97206b3f816f26cd2cf7d (powerpc/dma: use generic direct and swiotlb ops)

Code: Select all
git checkout 7decbcfc656805603ab97206b3f816f26cd2cf7d


Link to the Git: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.5

We have the bad commit! :-) The PASEMI onboard ethernet doesn't work with this commit anymore.

Error messages:

Code: Select all
[  367.627623] pci 0000:00:1a.0: dma_direct_map_page: overflow 0x000000026bcb5002+110 of device mask ffffffff bus mask 0
[  367.627631] pci 0000:00:1a.0: dma_direct_map_page: overflow 0x000000026bcb5002+110 of device mask ffffffff bus mask 0
[  367.627639] pci 0000:00:1a.0: dma_direct_map_page: overflow 0x000000026bcb5002+110 of device mask ffffffff bus mask 0
[  367.627647] pci 0000:00:1a.0: dma_direct_map_page: overflow 0x000000026bcb5002+110 of device mask ffffffff bus mask 0


pci 0000:00:1a.0 = 00:1a.0 DMA controller: PA Semi, Inc PWRficient DMA Controller (rev 12)

X5000 (P5020 board): U-Boot loads the kernel and the dtb file. Then the kernel starts but it doesn't find any hard disks (partitions). That means this is also the bad commit for the P5020 board.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.21

Postby xeno74 » Wed Dec 12, 2018 9:43 am

Link to the bad commit: powerpc/dma: use generic direct and swiotlb ops

I will investigate more in this problem with rollback the files in the bad commit.

First, I will rollback the PASEMI source code in the bad commit.

Files:

arch/powerpc/platforms/pasemi/iommu.c
arch/powerpc/platforms/pasemi/setup.c
arch/powerpc/include/asm/dma-mapping.h
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.21

Postby xeno74 » Wed Dec 12, 2018 4:31 pm

FYI

Christoph Hellwig wrote:Thanks for bisecting. I've spent some time going over the conversion
but can't really pinpoint it. I have three little patches that switch
parts of the code to the generic version. This is on top of the
last good commmit (977706f9755d2d697aa6f45b4f9f0e07516efeda).

Can you check with whіch one things stop working?


Code: Select all
From 83a4b87de6bc6a75b500c9959de88e2157fbcd7c Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Wed, 12 Dec 2018 15:07:49 +0100
Subject: get_required_mask

---
 arch/powerpc/kernel/dma-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c
index 5b15e53ee43d..2e682004959f 100644
--- a/arch/powerpc/kernel/dma-iommu.c
+++ b/arch/powerpc/kernel/dma-iommu.c
@@ -152,7 +152,7 @@ u64 dma_iommu_get_required_mask(struct device *dev)
       return 0;
 
    if (dev_is_pci(dev)) {
-      u64 bypass_mask = dma_nommu_get_required_mask(dev);
+      u64 bypass_mask = dma_direct_get_required_mask(dev);
 
       if (dma_iommu_bypass_supported(dev, bypass_mask))
          return bypass_mask;
--
2.19.2


Code: Select all
From c2579a3619575397929781a14895966cbc1d217b Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Wed, 12 Dec 2018 15:08:52 +0100
Subject: swiotlb dma_supported

---
 arch/powerpc/kernel/dma-swiotlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/dma-swiotlb.c b/arch/powerpc/kernel/dma-swiotlb.c
index aa11625c6691..52ee531c1a0d 100644
--- a/arch/powerpc/kernel/dma-swiotlb.c
+++ b/arch/powerpc/kernel/dma-swiotlb.c
@@ -36,7 +36,7 @@ const struct dma_map_ops powerpc_swiotlb_dma_ops = {
    .free = __dma_nommu_free_coherent,
    .map_sg = swiotlb_map_sg_attrs,
    .unmap_sg = swiotlb_unmap_sg_attrs,
-   .dma_supported = swiotlb_dma_supported,
+   .dma_supported = dma_direct_supported,
    .map_page = swiotlb_map_page,
    .unmap_page = swiotlb_unmap_page,
    .sync_single_for_cpu = swiotlb_sync_single_for_cpu,
--
2.19.2


Code: Select all
From 0105db9e6d8d031b4295116630fd0318fd146737 Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Wed, 12 Dec 2018 15:10:36 +0100
Subject: nommu dma_supported

---
 arch/powerpc/kernel/dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index a6590aa77181..f53d11d35230 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -179,7 +179,7 @@ const struct dma_map_ops dma_nommu_ops = {
    .alloc            = __dma_nommu_alloc_coherent,
    .free            = __dma_nommu_free_coherent,
    .map_sg            = dma_nommu_map_sg,
-   .dma_supported         = dma_nommu_dma_supported,
+   .dma_supported         = dma_direct_supported,
    .map_page         = dma_nommu_map_page,
 #ifdef CONFIG_NOT_COHERENT_CACHE
    .sync_single_for_cpu       = dma_nommu_sync_single,
--
2.19.2


Code: Select all
From 4c5dd4d4a4b4e63be722fd29ada896c5962072b8 Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Wed, 12 Dec 2018 15:11:38 +0100
Subject: alloc/free

---
 arch/powerpc/kernel/dma.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index f53d11d35230..d3db6d879559 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -176,8 +176,13 @@ static inline void dma_nommu_sync_single(struct device *dev,
 #endif
 
 const struct dma_map_ops dma_nommu_ops = {
+#ifdef CONFIG_NOT_COHERENT_CACHE
    .alloc            = __dma_nommu_alloc_coherent,
    .free            = __dma_nommu_free_coherent,
+#else
+   .alloc            = dma_direct_alloc,
+   .free            = dma_direct_free,
+#endif
    .map_sg            = dma_nommu_map_sg,
    .dma_supported         = dma_direct_supported,
    .map_page         = dma_nommu_map_page,
--
2.19.2
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

Re: Kernel 4.21

Postby xeno74 » Thu Dec 13, 2018 9:48 am

Today I tried the first patch with the last good commit (977706f9755d2d697aa6f45b4f9f0e07516efeda).

0001-get_required_mask.patch

Code: Select all
>From 83a4b87de6bc6a75b500c9959de88e2157fbcd7c Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Wed, 12 Dec 2018 15:07:49 +0100
Subject: get_required_mask

---
 arch/powerpc/kernel/dma-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c
index 5b15e53ee43d..2e682004959f 100644
--- a/arch/powerpc/kernel/dma-iommu.c
+++ b/arch/powerpc/kernel/dma-iommu.c
@@ -152,7 +152,7 @@ u64 dma_iommu_get_required_mask(struct device *dev)
       return 0;
 
    if (dev_is_pci(dev)) {
-      u64 bypass_mask = dma_nommu_get_required_mask(dev);
+      u64 bypass_mask = dma_direct_get_required_mask(dev);
 
       if (dma_iommu_bypass_supported(dev, bypass_mask))
          return bypass_mask;
--
2.19.2


Unfortunately this patch is already included in the last good commit (977706f9755d2d697aa6f45b4f9f0e07516efeda).
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

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

PreviousNext

Return to Platform: AmigaOne X1000 - Linux Only

Who is online

Users browsing this forum: No registered users and 2 guests