Skip to contentSkip to conversation

swiotlb: use depends on for DMA_RESTRICTED_POOL

PATCH In review Claire Chang 3 participants 3 messages Aug 27, 2021 – Aug 31, 2021 DMA mapping helpers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 swiotlb: use depends on for DMA_RESTRICTED_POOL

Use depends on instead of select for DMA_RESTRICTED_POOL; otherwise it will make SWIOTLB user configurable and cause compile errors for some arch (e.g. mips).

Fixes 0b84e4f8b793 ("swiotlb: Add restricted DMA pool initialization")
---
 kernel/dma/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/dma/Kconfig +1 -2
index fd4db714d86b..1b02179758cb 100644
@@ -82,8 +82,7 @@ config SWIOTLB
 
 config DMA_RESTRICTED_POOL
 	bool "DMA Restricted Pool"
-	depends on OF && OF_RESERVED_MEM
-	select SWIOTLB
+	depends on OF && OF_RESERVED_MEM && SWIOTLB
 	help
 	  This enables support for restricted DMA pools which provide a level of
 	  DMA memory protection on systems with limited hardware protection
Signature · 1 line
2.33.0.259.gc128427fd7-goog
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · Claire Chang

Use depends on instead of select for DMA_RESTRICTED_POOL; otherwise it will make SWIOTLB user configurable and cause compile errors for some arch (e.g. mips).

Fixes 0b84e4f8b793 ("swiotlb: Add restricted DMA pool initialization")
---
 kernel/dma/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/dma/Kconfig +0 -0
index fd4db714d86b..1b02179758cb 100644

kernel/dma/Kconfig config SWIOTLB · line 88

Quoted 9 lines
kernel/dma/Kconfig +1 -2
@@ -82,8 +82,7 @@ config SWIOTLB
 
 config DMA_RESTRICTED_POOL
 	bool "DMA Restricted Pool"
-	depends on OF && OF_RESERVED_MEM
-	select SWIOTLB
+	depends on OF && OF_RESERVED_MEM && SWIOTLB
 	help
 	  This enables support for restricted DMA pools which provide a level of
 	  DMA memory protection on systems with limited hardware protection

Will

#2 lore raw
Quoted 18 lines · Will Deacon
Quoted 17 lines · Claire Chang

Use depends on instead of select for DMA_RESTRICTED_POOL; otherwise it will make SWIOTLB user configurable and cause compile errors for some arch (e.g. mips).

Fixes 0b84e4f8b793 ("swiotlb: Add restricted DMA pool initialization")
---
 kernel/dma/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/dma/Kconfig +0 -0
index fd4db714d86b..1b02179758cb 100644
@@ -82,8 +82,7 @@ config SWIOTLB
 
Quoted 10 lines

kernel/dma/Kconfig config SWIOTLB · line 88

Quoted 8 lines
kernel/dma/Kconfig +1 -2
 config DMA_RESTRICTED_POOL
 	bool "DMA Restricted Pool"
-	depends on OF && OF_RESERVED_MEM
-	select SWIOTLB
+	depends on OF && OF_RESERVED_MEM && SWIOTLB
 	help
 	  This enables support for restricted DMA pools which provide a level of
 	  DMA memory protection on systems with limited hardware protection

I put it in linux-next and devel/for-linus-5.15.

I will wait a day and see if there are any issues with linux-next and if not will send out a GIT pull.

Thanks!

Quoted 2 lines

Will

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu