Skip to contentSkip to conversation

iommu: prompt for IOMMU_IO_PGTABLE_LPAE on ARM archs only

PATCH In review Chris Clayton 2 participants 3 messages Feb 15, 2015 – Feb 16, 2015 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu: prompt for IOMMU_IO_PGTABLE_LPAE on ARM archs only

When running "make oldconfig" for an x86_64 kernel, I was prompted for a setting for IOMMU_IO_PGTABLE_LPAE. From the prompt and the help text it appears that this config item is relevant to ARMv7/v8 only. This patch prevents the prompt on non-ARM architectures. Compile tested building a cross-compiled x86_64 kernel in an x86 user space. The resultant kernel boots fine and I am running it now.

Fixes e1d3c0fd701df831169b116cd5c5d6203ac07f70
drivers/iommu/Kconfig 2015-02-15 09:44:41.131926434 +0000 renamed from drivers/iommu/Kconfig.orig 2015-02-15 09:44:01.235927248 +0000 +1 -0
@@ -22,6 +22,7 @@ config IOMMU_IO_PGTABLE
 
 config IOMMU_IO_PGTABLE_LPAE
        bool "ARMv7/v8 Long Descriptor Format"
+       depends on ARM || ARM64
        select IOMMU_IO_PGTABLE
        help
          Enable support for the ARM long descriptor pagetable format.
#1 lore raw

Hi Chris,

Quoted 14 lines · Chris Clayton

When running "make oldconfig" for an x86_64 kernel, I was prompted for a setting for IOMMU_IO_PGTABLE_LPAE. From the prompt and the help text it appears that this config item is relevant to ARMv7/v8 only. This patch prevents the prompt on non-ARM architectures. Compile tested building a cross-compiled x86_64 kernel in an x86 user space. The resultant kernel boots fine and I am running it now.

Fixes e1d3c0fd701df831169b116cd5c5d6203ac07f70

drivers/iommu/Kconfig 2015-02-15 09:44:41.131926434 +0000 config IOMMU_IO_PGTABLE · line 28

Quoted 7 lines
drivers/iommu/Kconfig 2015-02-15 09:44:41.131926434 +0000 renamed from drivers/iommu/Kconfig.orig 2015-02-15 09:44:01.235927248 +0000 +1 -0
@@ -22,6 +22,7 @@ config IOMMU_IO_PGTABLE
 
 config IOMMU_IO_PGTABLE_LPAE
        bool "ARMv7/v8 Long Descriptor Format"
+       depends on ARM || ARM64
        select IOMMU_IO_PGTABLE
        help
          Enable support for the ARM long descriptor pagetable format.

What's the problem with this? The page-table code is intentionally decoupled from the CPU architecture and having this boot-tested on x86 found some real bugs that I'm currently fixing. Sure, you probably don't need this on your box, but it's not default y and you don't have to select it.

Will

#2 lore raw
Quoted 18 lines · Will Deacon

Hi Chris,

Quoted 15 lines · Chris Clayton

When running "make oldconfig" for an x86_64 kernel, I was prompted for a setting for IOMMU_IO_PGTABLE_LPAE. From the prompt and the help text it appears that this config item is relevant to ARMv7/v8 only. This patch prevents the prompt on non-ARM architectures. Compile tested building a cross-compiled x86_64 kernel in an x86 user space. The resultant kernel boots fine and I am running it now.

Fixes e1d3c0fd701df831169b116cd5c5d6203ac07f70
drivers/iommu/Kconfig 2015-02-15 09:44:41.131926434 +0000 renamed from drivers/iommu/Kconfig.orig 2015-02-15 09:44:01.235927248 +0000 +0 -0
@@ -22,6 +22,7 @@ config IOMMU_IO_PGTABLE
 
Quoted 13 lines

drivers/iommu/Kconfig 2015-02-15 09:44:41.131926434 +0000 config IOMMU_IO_PGTABLE · line 28

Quoted 6 lines
drivers/iommu/Kconfig 2015-02-15 09:44:41.131926434 +0000 renamed from drivers/iommu/Kconfig.orig 2015-02-15 09:44:01.235927248 +0000 +1 -0
 config IOMMU_IO_PGTABLE_LPAE
        bool "ARMv7/v8 Long Descriptor Format"
+       depends on ARM || ARM64
        select IOMMU_IO_PGTABLE
        help
          Enable support for the ARM long descriptor pagetable format.

What's the problem with this? The page-table code is intentionally decoupled from the CPU architecture and having this boot-tested on x86 found some real bugs that I'm currently fixing. Sure, you probably don't need this on your box, but it's not default y and you don't have to select it.

There's no real problem except that, as I said, the prompt and the help text suggest that the config is relevant to ARM architecture only. Same with the help text. When it popped up on x86_64, it was a surprise.

As you say, I can simply answer "N", but the prompt and the help need correcting, because for an ordinary Joe User like me, it's misleading.

Quoted 2 lines

Will