All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] powerpc: iommu: fix build when neither PCI or IBMVIO is set
@ 2021-04-04 19:26 ` Randy Dunlap
  0 siblings, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2021-04-04 19:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, kernel test robot, Michael Ellerman, linuxppc-dev,
	Anton Blanchard

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: d6b9a81b2a45 ("powerpc: IOMMU fault injection")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Anton Blanchard <anton@samba.org>
---
I was supposed to update this about one month ago, but then I lost
some email and also took a break for a few weeks, then I remembered,
so here it is.

 arch/powerpc/Kconfig.debug |    1 +
 1 file changed, 1 insertion(+)

--- lnx-512-rc1.orig/arch/powerpc/Kconfig.debug
+++ lnx-512-rc1/arch/powerpc/Kconfig.debug
@@ -353,6 +353,7 @@ config PPC_EARLY_DEBUG_CPM_ADDR
 config FAIL_IOMMU
 	bool "Fault-injection capability for IOMMU"
 	depends on FAULT_INJECTION
+	depends on PCI || IBMVIO
 	help
 	  Provide fault-injection capability for IOMMU. Each device can
 	  be selectively enabled via the fail_iommu property.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-10 14:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-04 19:26 [PATCH v2] powerpc: iommu: fix build when neither PCI or IBMVIO is set Randy Dunlap
2021-04-04 19:26 ` Randy Dunlap
2021-04-05  9:04 ` Christophe Leroy
2021-04-05 16:31   ` Randy Dunlap
2021-04-10 14:28 ` Michael Ellerman
2021-04-10 14:28   ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.