diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2017-02-08 15:13:25 -0500 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2017-02-08 15:13:25 -0500 |
commit | d88423f7844ea9941d55bde92716a50c3e131dd7 (patch) | |
tree | 666e0ca2a0122e6be7c41fa2def07b801364c919 | |
parent | d5adbfcd5f7bcc6fa58a41c5c5ada0e5c826ce2c (diff) |
vfio: Fix build break when SPAPR_TCE_IOMMU=n
Currently the kconfig logic for VFIO_IOMMU_SPAPR_TCE and VFIO_SPAPR_EEH
is broken when SPAPR_TCE_IOMMU=n. Leading to:
warning: (VFIO) selects VFIO_IOMMU_SPAPR_TCE which has unmet direct dependencies (VFIO && SPAPR_TCE_IOMMU)
warning: (VFIO) selects VFIO_IOMMU_SPAPR_TCE which has unmet direct dependencies (VFIO && SPAPR_TCE_IOMMU)
drivers/vfio/vfio_iommu_spapr_tce.c:113:8: error: implicit declaration of function 'mm_iommu_find'
This stems from the fact that VFIO selects VFIO_IOMMU_SPAPR_TCE, and
although it has an if clause, the condition is not correct.
We could fix it by doing select VFIO_IOMMU_SPAPR_TCE if SPAPR_TCE_IOMMU,
but the cleaner fix is to drop the selects and tie VFIO_IOMMU_SPAPR_TCE
to the value of VFIO, and express the dependencies in only once place.
Do the same for VFIO_SPAPR_EEH.
The end result is that the values of VFIO_IOMMU_SPAPR_TCE and
VFIO_SPAPR_EEH follow the value of VFIO, except when SPAPR_TCE_IOMMU=n
and/or EEH=n. Which is exactly what we want to happen.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
-rw-r--r-- | drivers/vfio/Kconfig | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig index 23eced02aaf6..c84333eb5eb5 100644 --- a/drivers/vfio/Kconfig +++ b/drivers/vfio/Kconfig | |||
@@ -6,12 +6,12 @@ config VFIO_IOMMU_TYPE1 | |||
6 | config VFIO_IOMMU_SPAPR_TCE | 6 | config VFIO_IOMMU_SPAPR_TCE |
7 | tristate | 7 | tristate |
8 | depends on VFIO && SPAPR_TCE_IOMMU | 8 | depends on VFIO && SPAPR_TCE_IOMMU |
9 | default n | 9 | default VFIO |
10 | 10 | ||
11 | config VFIO_SPAPR_EEH | 11 | config VFIO_SPAPR_EEH |
12 | tristate | 12 | tristate |
13 | depends on EEH && VFIO_IOMMU_SPAPR_TCE | 13 | depends on EEH && VFIO_IOMMU_SPAPR_TCE |
14 | default n | 14 | default VFIO |
15 | 15 | ||
16 | config VFIO_VIRQFD | 16 | config VFIO_VIRQFD |
17 | tristate | 17 | tristate |
@@ -22,8 +22,6 @@ menuconfig VFIO | |||
22 | tristate "VFIO Non-Privileged userspace driver framework" | 22 | tristate "VFIO Non-Privileged userspace driver framework" |
23 | depends on IOMMU_API | 23 | depends on IOMMU_API |
24 | select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM_SMMU || ARM_SMMU_V3) | 24 | select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM_SMMU || ARM_SMMU_V3) |
25 | select VFIO_IOMMU_SPAPR_TCE if (PPC_POWERNV || PPC_PSERIES) | ||
26 | select VFIO_SPAPR_EEH if (PPC_POWERNV || PPC_PSERIES) | ||
27 | select ANON_INODES | 25 | select ANON_INODES |
28 | help | 26 | help |
29 | VFIO provides a framework for secure userspace device drivers. | 27 | VFIO provides a framework for secure userspace device drivers. |