powerpc: iommu: fix build when neither PCI or IBMVIO is set
[ Upstream commitb27dadecdf
] 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:d6b9a81b2a
("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 Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2a70edb85e
commit
b2fedee1f8
@ -350,6 +350,7 @@ config PPC_EARLY_DEBUG_CPM_ADDR
|
|||||||
config FAIL_IOMMU
|
config FAIL_IOMMU
|
||||||
bool "Fault-injection capability for IOMMU"
|
bool "Fault-injection capability for IOMMU"
|
||||||
depends on FAULT_INJECTION
|
depends on FAULT_INJECTION
|
||||||
|
depends on PCI || IBMVIO
|
||||||
help
|
help
|
||||||
Provide fault-injection capability for IOMMU. Each device can
|
Provide fault-injection capability for IOMMU. Each device can
|
||||||
be selectively enabled via the fail_iommu property.
|
be selectively enabled via the fail_iommu property.
|
||||||
|
Reference in New Issue
Block a user