AmigaOne X5000 platform specific issues related to Linux only.
xeno74
Posts: 9350 Joined: Fri Mar 23, 2012 7:58 am
Post
by xeno74 » Thu Dec 13, 2018 10:35 am
xeno74 wrote: 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 ).
I was wrong. This patch isn't included in the last good commit. I tried it again but I get the following error message:
Code: Select all
MODPOST vmlinux.o
arch/powerpc/kernel/dma-iommu.o: In function `.dma_iommu_get_required_mask':
(.text+0x274): undefined reference to `.dma_direct_get_required_mask'
make: *** [vmlinux] Error 1
xeno74
Posts: 9350 Joined: Fri Mar 23, 2012 7:58 am
Post
by xeno74 » Thu Dec 13, 2018 12:31 pm
FYI:
Christoph Hellwig wrote:
Sorry, you need this one liner before all the patches posted last time:
Code: Select all
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index d8819e3a1eb1..7e78c2798f2f 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -154,6 +154,7 @@ config PPC
select CLONE_BACKWARDS
select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
select DYNAMIC_FTRACE if FUNCTION_TRACER
+ select DMA_DIRECT_OPS
select EDAC_ATOMIC_SCRUB
select EDAC_SUPPORT
select GENERIC_ATOMIC64 if PPC32
xeno74
Posts: 9350 Joined: Fri Mar 23, 2012 7:58 am
Post
by xeno74 » Thu Dec 13, 2018 2:31 pm
xeno74 wrote: 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
Result: PASEMI onboard ethernet works and the X5000 (P5020 board) boots.
xeno74
Posts: 9350 Joined: Fri Mar 23, 2012 7:58 am
Post
by xeno74 » Thu Dec 13, 2018 6:32 pm
Next patch:
0002-swiotlb-dma_supported.patch for the last good commit (
977706f9755d2d697aa6f45b4f9f0e07516efeda ).
Code: Select all
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,
The PASEMI onboard ethernet works and the X5000 (P5020 board) boots.
xeno74
Posts: 9350 Joined: Fri Mar 23, 2012 7:58 am
Post
by xeno74 » Thu Dec 13, 2018 10:50 pm
Next patch:
0003-nommu-dma_supported.patch
Code: Select all
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,
No problems with the PASEMI onboard ethernet and the P5020 board boots.
xeno74
Posts: 9350 Joined: Fri Mar 23, 2012 7:58 am
Post
by xeno74 » Fri Dec 14, 2018 12:40 pm
Next patch:
0004-alloc-free.patch
Code: Select all
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,
Result: The PASEMI onboard ethernet works and the P5020 board boots!
xeno74
Posts: 9350 Joined: Fri Mar 23, 2012 7:58 am
Post
by xeno74 » Sun Dec 16, 2018 7:01 pm
FYI:
Christoph Hellwig wrote:
FYI, given that we are one week before the expected 4.20 release
date and I haven't found the bug plaging Christians setups I think
we need to defer most of this to the next merge window.
I'd still like to get a few bits in earlier, which I will send out
separately now.
xeno74
Posts: 9350 Joined: Fri Mar 23, 2012 7:58 am
Post
by xeno74 » Wed Dec 26, 2018 9:40 pm
Hi All,
The Linux 4.21 kernel merge window is open for merging. Linus Torvalds has added a lot of new source code to the Linux Git. I created the
first alpha today.
New:
Download:
vmlinux-4.21-alpha1-AmigaOne_X1000_X5000.tar.gz
Please test it.
Thanks,
Christian
Skateman
Posts: 861 Joined: Thu Aug 10, 2017 8:36 pm
Location: The Netherlands
Post
by Skateman » Wed Dec 26, 2018 10:41 pm
And here it is.... running smooth on the AmigaOne X5000
The bigger picture...
http://www.skateman.nl/wp-content/uploa ... 223708.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