vfio/nvlink: Add missing SPAPR_TCE_IOMMU depends
authorJason Gunthorpe <jgg@nvidia.com>
Mon, 29 Mar 2021 19:00:16 +0000 (16:00 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Apr 2021 12:47:43 +0000 (14:47 +0200)
commitc92e8a8ecb9d9e447f4eaf71134cdc90b6ff3a67
tree78462b8017ea2fcf3932abb71cb938ee90db0962
parent7f93d47677dd2e1461b992569955aa1a6de16995
vfio/nvlink: Add missing SPAPR_TCE_IOMMU depends

commit e0146a108ce4d2c22b9510fd12268e3ee72a0161 upstream.

Compiling the nvlink stuff relies on the SPAPR_TCE_IOMMU otherwise there
are compile errors:

 drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: error: implicit declaration of function 'mm_iommu_put' [-Werror,-Wimplicit-function-declaration]
                            ret = mm_iommu_put(data->mm, data->mem);

As PPC only defines these functions when the config is set.

Previously this wasn't a problem by chance as SPAPR_TCE_IOMMU was the only
IOMMU that could have satisfied IOMMU_API on POWERNV.

Fixes: 179209fa1270 ("vfio: IOMMU_API should be selected")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Message-Id: <0-v1-83dba9768fc3+419-vfio_nvlink2_kconfig_jgg@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vfio/pci/Kconfig