* [PATCH] iommu: SUN50I_IOMMU should depend on HAS_DMA
@ 2020-06-29 12:11 Geert Uytterhoeven
2020-06-29 13:27 ` Maxime Ripard
2020-06-29 16:29 ` Robin Murphy
0 siblings, 2 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2020-06-29 12:11 UTC (permalink / raw)
To: Joerg Roedel, Maxime Ripard; +Cc: iommu, Geert Uytterhoeven, linux-kernel
If NO_DMA=y (e.g. Sun-3 all{mod,yes}-config):
drivers/iommu/dma-iommu.o: In function `iommu_dma_mmap':
dma-iommu.c:(.text+0x92e): undefined reference to `dma_pgprot'
IOMMU_DMA must not be selected, unless HAS_DMA=y.
Hence fix this by making SUN50I_IOMMU depend on HAS_DMA.
Fixes: 4100b8c229b32835 ("iommu: Add Allwinner H6 IOMMU driver")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/iommu/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 6dc49ed8377a5c12..b0f308cb7f7c2fc2 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -305,6 +305,7 @@ config ROCKCHIP_IOMMU
config SUN50I_IOMMU
bool "Allwinner H6 IOMMU Support"
+ depends on HAS_DMA
depends on ARCH_SUNXI || COMPILE_TEST
select ARM_DMA_USE_IOMMU
select IOMMU_API
--
2.17.1
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu: SUN50I_IOMMU should depend on HAS_DMA
2020-06-29 12:11 [PATCH] iommu: SUN50I_IOMMU should depend on HAS_DMA Geert Uytterhoeven
@ 2020-06-29 13:27 ` Maxime Ripard
2020-06-29 16:29 ` Robin Murphy
1 sibling, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2020-06-29 13:27 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: iommu, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 576 bytes --]
On Mon, Jun 29, 2020 at 02:11:46PM +0200, Geert Uytterhoeven wrote:
> If NO_DMA=y (e.g. Sun-3 all{mod,yes}-config):
>
> drivers/iommu/dma-iommu.o: In function `iommu_dma_mmap':
> dma-iommu.c:(.text+0x92e): undefined reference to `dma_pgprot'
>
> IOMMU_DMA must not be selected, unless HAS_DMA=y.
>
> Hence fix this by making SUN50I_IOMMU depend on HAS_DMA.
>
> Fixes: 4100b8c229b32835 ("iommu: Add Allwinner H6 IOMMU driver")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Thanks!
Maxime
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 156 bytes --]
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu: SUN50I_IOMMU should depend on HAS_DMA
2020-06-29 12:11 [PATCH] iommu: SUN50I_IOMMU should depend on HAS_DMA Geert Uytterhoeven
2020-06-29 13:27 ` Maxime Ripard
@ 2020-06-29 16:29 ` Robin Murphy
2020-06-30 10:09 ` Joerg Roedel
1 sibling, 1 reply; 5+ messages in thread
From: Robin Murphy @ 2020-06-29 16:29 UTC (permalink / raw)
To: Geert Uytterhoeven, Joerg Roedel, Maxime Ripard; +Cc: iommu, linux-kernel
On 2020-06-29 13:11, Geert Uytterhoeven wrote:
> If NO_DMA=y (e.g. Sun-3 all{mod,yes}-config):
>
> drivers/iommu/dma-iommu.o: In function `iommu_dma_mmap':
> dma-iommu.c:(.text+0x92e): undefined reference to `dma_pgprot'
>
> IOMMU_DMA must not be selected, unless HAS_DMA=y.
Wait, no, IOMMU_DMA should not be selected by drivers at all - it's for
arch code to choose.
x86 just complicates matters with some of its arch code being in its
IOMMU drivers...
Robin.
> Hence fix this by making SUN50I_IOMMU depend on HAS_DMA.
>
> Fixes: 4100b8c229b32835 ("iommu: Add Allwinner H6 IOMMU driver")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> drivers/iommu/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index 6dc49ed8377a5c12..b0f308cb7f7c2fc2 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -305,6 +305,7 @@ config ROCKCHIP_IOMMU
>
> config SUN50I_IOMMU
> bool "Allwinner H6 IOMMU Support"
> + depends on HAS_DMA
> depends on ARCH_SUNXI || COMPILE_TEST
> select ARM_DMA_USE_IOMMU
> select IOMMU_API
>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu: SUN50I_IOMMU should depend on HAS_DMA
2020-06-29 16:29 ` Robin Murphy
@ 2020-06-30 10:09 ` Joerg Roedel
2020-06-30 10:49 ` Robin Murphy
0 siblings, 1 reply; 5+ messages in thread
From: Joerg Roedel @ 2020-06-30 10:09 UTC (permalink / raw)
To: Robin Murphy; +Cc: iommu, Geert Uytterhoeven, Maxime Ripard, linux-kernel
On Mon, Jun 29, 2020 at 05:29:36PM +0100, Robin Murphy wrote:
> On 2020-06-29 13:11, Geert Uytterhoeven wrote:
> > If NO_DMA=y (e.g. Sun-3 all{mod,yes}-config):
> >
> > drivers/iommu/dma-iommu.o: In function `iommu_dma_mmap':
> > dma-iommu.c:(.text+0x92e): undefined reference to `dma_pgprot'
> >
> > IOMMU_DMA must not be selected, unless HAS_DMA=y.
>
> Wait, no, IOMMU_DMA should not be selected by drivers at all - it's for arch
> code to choose.
Okay, but that is a different fix, right? I queued this patch for v5.8
for now.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iommu: SUN50I_IOMMU should depend on HAS_DMA
2020-06-30 10:09 ` Joerg Roedel
@ 2020-06-30 10:49 ` Robin Murphy
0 siblings, 0 replies; 5+ messages in thread
From: Robin Murphy @ 2020-06-30 10:49 UTC (permalink / raw)
To: Joerg Roedel; +Cc: iommu, Geert Uytterhoeven, Maxime Ripard, linux-kernel
On 2020-06-30 11:09, Joerg Roedel wrote:
> On Mon, Jun 29, 2020 at 05:29:36PM +0100, Robin Murphy wrote:
>> On 2020-06-29 13:11, Geert Uytterhoeven wrote:
>>> If NO_DMA=y (e.g. Sun-3 all{mod,yes}-config):
>>>
>>> drivers/iommu/dma-iommu.o: In function `iommu_dma_mmap':
>>> dma-iommu.c:(.text+0x92e): undefined reference to `dma_pgprot'
>>>
>>> IOMMU_DMA must not be selected, unless HAS_DMA=y.
>>
>> Wait, no, IOMMU_DMA should not be selected by drivers at all - it's for arch
>> code to choose.
>
> Okay, but that is a different fix, right? I queued this patch for v5.8
> for now.
If the driver didn't select IOMMU_DMA (completely unnecessarily, I might
add), there wouldn't be any problem to fix in the first place ;)
Robin.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-06-30 10:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 12:11 [PATCH] iommu: SUN50I_IOMMU should depend on HAS_DMA Geert Uytterhoeven
2020-06-29 13:27 ` Maxime Ripard
2020-06-29 16:29 ` Robin Murphy
2020-06-30 10:09 ` Joerg Roedel
2020-06-30 10:49 ` Robin Murphy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).