Skip to contentSkip to conversation

iommu/io-pgtable-arm: Add built time dependency

PATCH New Jean Delvare 2 participants 5 messages Feb 20, 2015 – Feb 23, 2015 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/io-pgtable-arm: Add built time dependency

If io-pgtable-arm is an ARM-specific driver then configuration option IOMMU_IO_PGTABLE_LPAE should not be presented to the user by default for non-ARM kernels.

Cc Will Deacon <[email protected]>
Cc Joerg Roedel <[email protected]>
---
 drivers/iommu/Kconfig |    1 +
 1 file changed, 1 insertion(+)
drivers/iommu/Kconfig +1 -0
@@ -23,6 +23,7 @@ config IOMMU_IO_PGTABLE
 config IOMMU_IO_PGTABLE_LPAE
 	bool "ARMv7/v8 Long Descriptor Format"
 	select IOMMU_IO_PGTABLE
+	depends on ARM || COMPILE_TEST
 	help
 	  Enable support for the ARM long descriptor pagetable format.
 	  This allocator supports 4K/2M/1G, 16K/32M and 64K/512M page
Signature · 2 lines
Jean Delvare
SUSE L3 Support
#1 lore raw

PATCH 1/1 iommu/io-pgtable-arm: Add built time dependency

Quoted 14 lines · Jean Delvare

If io-pgtable-arm is an ARM-specific driver then configuration option IOMMU_IO_PGTABLE_LPAE should not be presented to the user by default for non-ARM kernels.

Cc Will Deacon <[email protected]>
Cc Joerg Roedel <[email protected]>
---
 drivers/iommu/Kconfig |    1 +
 1 file changed, 1 insertion(+)

drivers/iommu/Kconfig config IOMMU_IO_PGTABLE · line 29

Quoted 7 lines
drivers/iommu/Kconfig +1 -0
@@ -23,6 +23,7 @@ config IOMMU_IO_PGTABLE
 config IOMMU_IO_PGTABLE_LPAE
 	bool "ARMv7/v8 Long Descriptor Format"
 	select IOMMU_IO_PGTABLE
+	depends on ARM || COMPILE_TEST
 	help
 	  Enable support for the ARM long descriptor pagetable format.
 	  This allocator supports 4K/2M/1G, 16K/32M and 64K/512M page

So this code doesn't actually *depend* on any arch code at all. In fact, having it built and booted on x86 revealed a couple of bugs that I've since fixed. I'd rather let this run everywhere, but if people insist on the false dependency, so be it but we should add ARM64 to the mix too.

Will

#2 lore raw

PATCH 1/1 iommu/io-pgtable-arm: Add built time dependency

Hi Will,

Quoted 12 lines · Will Deacon
Quoted 11 lines · Jean Delvare

If io-pgtable-arm is an ARM-specific driver then configuration option IOMMU_IO_PGTABLE_LPAE should not be presented to the user by default for non-ARM kernels.

Cc Will Deacon <[email protected]>
Cc Joerg Roedel <[email protected]>
---
 drivers/iommu/Kconfig |    1 +
 1 file changed, 1 insertion(+)
Quoted 15 lines

drivers/iommu/Kconfig config IOMMU_IO_PGTABLE · line 29

Quoted 10 lines
drivers/iommu/Kconfig +1 -0
@@ -23,6 +23,7 @@ config IOMMU_IO_PGTABLE
 config IOMMU_IO_PGTABLE_LPAE
 	bool "ARMv7/v8 Long Descriptor Format"
 	select IOMMU_IO_PGTABLE
+	depends on ARM || COMPILE_TEST
 	help
 	  Enable support for the ARM long descriptor pagetable format.
 	  This allocator supports 4K/2M/1G, 16K/32M and 64K/512M page

So this code doesn't actually *depend* on any arch code at all. In fact, having it built and booted on x86 revealed a couple of bugs that I've since fixed. I'd rather let this run everywhere, but if people insist on the false dependency, so be it but we should add ARM64 to the mix too.

Oh, I'm not insisting on anything ;-) If the code is useful on other architectures then just ignore this patch. But if the only point of using it on other architectures is to reveal bugs which would not have triggered otherwise, then that's what COMPILE_TEST is there for.

Quoted 1 line

From the option description and help text, it really looks

ARM-specific, so if it is not, the help text at least should be improved.

Thanks,

Signature · 2 lines
Jean Delvare
SUSE L3 Support
#3 lore raw

PATCH 1/1 iommu/io-pgtable-arm: Add built time dependency

Quoted 29 lines · Jean Delvare
Quoted 12 lines · Will Deacon
Quoted 11 lines · Jean Delvare

If io-pgtable-arm is an ARM-specific driver then configuration option IOMMU_IO_PGTABLE_LPAE should not be presented to the user by default for non-ARM kernels.

Cc Will Deacon <[email protected]>
Cc Joerg Roedel <[email protected]>
---
 drivers/iommu/Kconfig |    1 +
 1 file changed, 1 insertion(+)
Quoted 15 lines

drivers/iommu/Kconfig config IOMMU_IO_PGTABLE · line 29

Quoted 10 lines
drivers/iommu/Kconfig +1 -0
@@ -23,6 +23,7 @@ config IOMMU_IO_PGTABLE
 config IOMMU_IO_PGTABLE_LPAE
 	bool "ARMv7/v8 Long Descriptor Format"
 	select IOMMU_IO_PGTABLE
+	depends on ARM || COMPILE_TEST
 	help
 	  Enable support for the ARM long descriptor pagetable format.
 	  This allocator supports 4K/2M/1G, 16K/32M and 64K/512M page

So this code doesn't actually *depend* on any arch code at all. In fact, having it built and booted on x86 revealed a couple of bugs that I've since fixed. I'd rather let this run everywhere, but if people insist on the false dependency, so be it but we should add ARM64 to the mix too.

Quoted 4 lines

Oh, I'm not insisting on anything ;-) If the code is useful on other architectures then just ignore this patch. But if the only point of using it on other architectures is to reveal bugs which would not have triggered otherwise, then that's what COMPILE_TEST is there for.

Sure, COMPILE_TEST should definitely be there if we add a dependency, but actually the issues raised so far were by *running* the code (there are some boot-time self-tests).

Quoted 3 lines

From the option description and help text, it really looks ARM-specific, so if it is not, the help text at least should be improved.

It's ARM-specific in that the users of the page table code are IOMMUs typically present in ARM SoCs. However, there's no reason why you couldn't stick one of these IOMMUs in another SoC in the same way that you can use an Intel NIC on a PowerPC box.

Will

#4 lore raw

PATCH 1/1 iommu/io-pgtable-arm: Add built time dependency

Hi Will,

Quoted 30 lines · Will Deacon
Quoted 29 lines · Jean Delvare
Quoted 27 lines · Will Deacon
Quoted 14 lines · Jean Delvare

If io-pgtable-arm is an ARM-specific driver then configuration option IOMMU_IO_PGTABLE_LPAE should not be presented to the user by default for non-ARM kernels.

Cc Will Deacon <[email protected]>
Cc Joerg Roedel <[email protected]>
---
 drivers/iommu/Kconfig |    1 +
 1 file changed, 1 insertion(+)

drivers/iommu/Kconfig config IOMMU_IO_PGTABLE · line 29

Quoted 7 lines
drivers/iommu/Kconfig +1 -0
@@ -23,6 +23,7 @@ config IOMMU_IO_PGTABLE
 config IOMMU_IO_PGTABLE_LPAE
 	bool "ARMv7/v8 Long Descriptor Format"
 	select IOMMU_IO_PGTABLE
+	depends on ARM || COMPILE_TEST
 	help
 	  Enable support for the ARM long descriptor pagetable format.
 	  This allocator supports 4K/2M/1G, 16K/32M and 64K/512M page

So this code doesn't actually *depend* on any arch code at all. In fact, having it built and booted on x86 revealed a couple of bugs that I've since fixed. I'd rather let this run everywhere, but if people insist on the false dependency, so be it but we should add ARM64 to the mix too.

Quoted 8 lines
Quoted 4 lines

Oh, I'm not insisting on anything ;-) If the code is useful on other architectures then just ignore this patch. But if the only point of using it on other architectures is to reveal bugs which would not have triggered otherwise, then that's what COMPILE_TEST is there for.

Sure, COMPILE_TEST should definitely be there if we add a dependency, but actually the issues raised so far were by *running* the code (there are some boot-time self-tests).

Thanks for the clarification. That's unusual but I think this still fits in the spirit of COMPILE_TEST. I don't think it would make sense to add a separate option got

Quoted 8 lines
Quoted 3 lines

From the option description and help text, it really looks ARM-specific, so if it is not, the help text at least should be improved.

It's ARM-specific in that the users of the page table code are IOMMUs typically present in ARM SoCs. However, there's no reason why you couldn't stick one of these IOMMUs in another SoC in the same way that you can use an Intel NIC on a PowerPC box.

Well, plugging a card in a PCI slot is something everyone can actually do. IOMMUs are at a lower level and must be part of the mainboard by design. So the comparison does not really hold.

My purpose is to make kernel configuration easier and faster by skipping irrelevant questions, and also to avoid that code ends up being built in distribution kernels for targets that don't need it. The COMPILE_TEST ensures that the code is still build on allmodconfig and allyesconfig kernels so test coverage should not be affected.

I'll send an updated patch with ARM64 added as you suggested.

Thanks,

Signature · 2 lines
Jean Delvare
SUSE L3 Support