Skip to content

Commit b27dade

Browse files
rddunlapmpe
authored andcommitted
powerpc: iommu: fix build when neither PCI or IBMVIO is set
When neither CONFIG_PCI nor CONFIG_IBMVIO is set/enabled, iommu.c has a build error. The fault injection code is not useful in that kernel config, so make the FAIL_IOMMU option depend on PCI || IBMVIO. Prevents this build error (warning escalated to error): ../arch/powerpc/kernel/iommu.c:178:30: error: 'fail_iommu_bus_notifier' defined but not used [-Werror=unused-variable] 178 | static struct notifier_block fail_iommu_bus_notifier = { Fixes: d6b9a81 ("powerpc: IOMMU fault injection") Reported-by: kernel test robot <lkp@intel.com> Suggested-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210404192623.10697-1-rdunlap@infradead.org
1 parent 01ed051 commit b27dade

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎arch/powerpc/Kconfig.debug‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ config PPC_EARLY_DEBUG_CPM_ADDR
353353
config FAIL_IOMMU
354354
bool "Fault-injection capability for IOMMU"
355355
depends on FAULT_INJECTION
356+
depends on PCI || IBMVIO
356357
help
357358
Provide fault-injection capability for IOMMU. Each device can
358359
be selectively enabled via the fail_iommu property.

0 commit comments

Comments
 (0)