Skip to contentSkip to conversation

Warnings in arch/arm64/mm/dma-mapping.c

PATCH Christoph Hellwig 4 participants 5 messages Oct 30, 2018 – Nov 2, 2018 1 message not in the archive arm64

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 7 lines · Florian Fainelli

Hi,

I have not a chance to run a bisection yet, but I suspect this is coming from Christoph's latest batch of DMA-API changes in ARM64 under the merge commit befa93633193e5327e4045d1e5fa29114580fa5d ("Merge tag 'dma-mapping-4.20-1' of git://git.infradead.org/users/hch/dma-mapping"),
here are the warnings:

This should fix it:

---

Quoted 1 line

From 773c5e097c5cf3868443ffb79ae64d79f70e3ccf Mon Sep 17 00:00:00 2001

From: Christoph Hellwig <[email protected]>
Date: Tue, 30 Oct 2018 09:41:29 +0200
Subject: arm64: fix warnings without CONFIG_IOMMU_DMA

__swiotlb_get_sgtable_page and __swiotlb_mmap_pfn are not only misnamed but also only used if CONFIG_IOMMU_DMA is set. Just add a simple ifdef for now, given that we plan to remove them entirely for the next merge window.

---
 arch/arm64/mm/dma-mapping.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/mm/dma-mapping.c +2 -0
index d190612b8f33..560756a7290e 100644
@@ -160,6 +160,7 @@ void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr,
 	__dma_unmap_area(phys_to_virt(paddr), size, dir);
 }
 
+#ifdef CONFIG_IOMMU_DMA
 static int __swiotlb_get_sgtable_page(struct sg_table *sgt,
 				      struct page *page, size_t size)
 {
@@ -188,6 +189,7 @@ static int __swiotlb_mmap_pfn(struct vm_area_struct *vma,
 
 	return ret;
 }
+#endif /* CONFIG_IOMMU_DMA */
 
 static int __init atomic_pool_init(void)
 {
Signature · 1 line
2.19.1
Tested-by
#2 lore raw
Quoted 8 lines · Christoph Hellwig
Quoted 5 lines · Florian Fainelli

I have not a chance to run a bisection yet, but I suspect this is coming from Christoph's latest batch of DMA-API changes in ARM64 under the merge commit befa93633193e5327e4045d1e5fa29114580fa5d ("Merge tag 'dma-mapping-4.20-1' of git://git.infradead.org/users/hch/dma-mapping"),
here are the warnings:

This should fix it:

I guess Catalin can pick this up for -rc1, since there's also the kprobes RO fix kicking around for arm64?

Will

Quoted 40 lines

---
From 773c5e097c5cf3868443ffb79ae64d79f70e3ccf Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <[email protected]>
Date: Tue, 30 Oct 2018 09:41:29 +0200
Subject: arm64: fix warnings without CONFIG_IOMMU_DMA

__swiotlb_get_sgtable_page and __swiotlb_mmap_pfn are not only misnamed but also only used if CONFIG_IOMMU_DMA is set. Just add a simple ifdef for now, given that we plan to remove them entirely for the next merge window.

---
 arch/arm64/mm/dma-mapping.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/mm/dma-mapping.c +2 -0
index d190612b8f33..560756a7290e 100644
@@ -160,6 +160,7 @@ void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr,
 	__dma_unmap_area(phys_to_virt(paddr), size, dir);
 }
 
+#ifdef CONFIG_IOMMU_DMA
 static int __swiotlb_get_sgtable_page(struct sg_table *sgt,
 				      struct page *page, size_t size)
 {
@@ -188,6 +189,7 @@ static int __swiotlb_mmap_pfn(struct vm_area_struct *vma,
 
 	return ret;
 }
+#endif /* CONFIG_IOMMU_DMA */
 
 static int __init atomic_pool_init(void)
 {
Signature · 1 line
2.19.1
#3 lore raw
Quoted 11 lines · Will Deacon
Quoted 8 lines · Christoph Hellwig
Quoted 5 lines · Florian Fainelli

I have not a chance to run a bisection yet, but I suspect this is coming from Christoph's latest batch of DMA-API changes in ARM64 under the merge commit befa93633193e5327e4045d1e5fa29114580fa5d ("Merge tag 'dma-mapping-4.20-1' of git://git.infradead.org/users/hch/dma-mapping"),
here are the warnings:

This should fix it:

Thanks for the quick fix!

Quoted 46 lines

I guess Catalin can pick this up for -rc1, since there's also the kprobes RO fix kicking around for arm64?

Will

Quoted 40 lines

---
From 773c5e097c5cf3868443ffb79ae64d79f70e3ccf Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <[email protected]>
Date: Tue, 30 Oct 2018 09:41:29 +0200
Subject: arm64: fix warnings without CONFIG_IOMMU_DMA

__swiotlb_get_sgtable_page and __swiotlb_mmap_pfn are not only misnamed but also only used if CONFIG_IOMMU_DMA is set. Just add a simple ifdef for now, given that we plan to remove them entirely for the next merge window.

---
 arch/arm64/mm/dma-mapping.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/mm/dma-mapping.c +2 -0
index d190612b8f33..560756a7290e 100644
@@ -160,6 +160,7 @@ void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr,
 	__dma_unmap_area(phys_to_virt(paddr), size, dir);
 }
 
+#ifdef CONFIG_IOMMU_DMA
 static int __swiotlb_get_sgtable_page(struct sg_table *sgt,
 				      struct page *page, size_t size)
 {
@@ -188,6 +189,7 @@ static int __swiotlb_mmap_pfn(struct vm_area_struct *vma,
 
 	return ret;
 }
+#endif /* CONFIG_IOMMU_DMA */
 
 static int __init atomic_pool_init(void)
 {
Signature · 1 line
2.19.1
Signature · 1 line
Florian
maintainer Acked-by
#4 lore raw
In reply to Will Deacon
Quoted 8 lines · Will Deacon
Quoted 7 lines · Christoph Hellwig
Quoted 5 lines · Florian Fainelli

I have not a chance to run a bisection yet, but I suspect this is coming from Christoph's latest batch of DMA-API changes in ARM64 under the merge commit befa93633193e5327e4045d1e5fa29114580fa5d ("Merge tag 'dma-mapping-4.20-1' of git://git.infradead.org/users/hch/dma-mapping"),
here are the warnings:

Quoted 6 lines
Quoted 1 line

This should fix it:

I guess Catalin can pick this up for -rc1, since there's also the kprobes RO fix kicking around for arm64?

I can pick it up at -rc1 as I don't have Christoph's patches in my tree (and don't want to base a branch on some random point in the merging window).

Alternatively, it could go via Christoph's tree for -rc1.

#5 lore raw
Quoted 16 lines · Catalin Marinas
Quoted 8 lines · Will Deacon
Quoted 7 lines · Christoph Hellwig
Quoted 5 lines · Florian Fainelli

I have not a chance to run a bisection yet, but I suspect this is coming from Christoph's latest batch of DMA-API changes in ARM64 under the merge commit befa93633193e5327e4045d1e5fa29114580fa5d ("Merge tag 'dma-mapping-4.20-1' of git://git.infradead.org/users/hch/dma-mapping"),
here are the warnings:

Quoted 6 lines
Quoted 1 line

This should fix it:

I guess Catalin can pick this up for -rc1, since there's also the kprobes RO fix kicking around for arm64?

Quoted 7 lines

I can pick it up at -rc1 as I don't have Christoph's patches in my tree (and don't want to base a branch on some random point in the merging window).

Alternatively, it could go via Christoph's tree for -rc1.

I'll send it on tomorrow.