linux-stable/drivers/iommu
Bartosz Golaszewski 9def3b1a07 iommu/vt-d: Don't dereference iommu_device if IOMMU_API is not built
Since commit c40aaaac10 ("iommu/vt-d: Gracefully handle DMAR units
with no supported address widths") dmar.c needs struct iommu_device to
be selected. We can drop this dependency by not dereferencing struct
iommu_device if IOMMU_API is not selected and by reusing the information
stored in iommu->drhd->ignored instead.

This fixes the following build error when IOMMU_API is not selected:

drivers/iommu/intel/dmar.c: In function ‘free_iommu’:
drivers/iommu/intel/dmar.c:1139:41: error: ‘struct iommu_device’ has no member named ‘ops’
 1139 |  if (intel_iommu_enabled && iommu->iommu.ops) {
                                                ^

Fixes: c40aaaac10 ("iommu/vt-d: Gracefully handle DMAR units with no supported address widths")
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Acked-by: David Woodhouse <dwmw@amazon.co.uk>
Link: https://lore.kernel.org/r/20201013073055.11262-1-brgl@bgdev.pl
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2020-10-19 14:16:02 +02:00
..
amd Merge branches 'arm/allwinner', 'arm/mediatek', 'arm/renesas', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/amd', 'x86/vt-d' and 'core' into next 2020-10-07 11:51:59 +02:00
arm Merge branches 'arm/allwinner', 'arm/mediatek', 'arm/renesas', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/amd', 'x86/vt-d' and 'core' into next 2020-10-07 11:51:59 +02:00
intel iommu/vt-d: Don't dereference iommu_device if IOMMU_API is not built 2020-10-19 14:16:02 +02:00
dma-iommu.c iommu/dma: Handle init_iova_flush_queue() failure in dma-iommu path 2020-09-18 17:13:21 +02:00
exynos-iommu.c iommu/exynos: add missing put_device() call in exynos_iommu_of_xlate() 2020-09-24 10:48:29 +02:00
fsl_pamu.c iommu/pamu: Replace use of kzfree with kfree_sensitive 2020-09-18 10:59:04 +02:00
fsl_pamu.h
fsl_pamu_domain.c iommu/pamu: Use dev_iommu_priv_get/set() 2020-06-30 11:59:48 +02:00
fsl_pamu_domain.h
hyperv-iommu.c irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-14 17:44:42 +02:00
io-pgtable-arm-v7s.c iommu: Add gfp parameter to io_pgtable_ops->map() 2020-07-24 14:29:47 +02:00
io-pgtable-arm.c iommu/io-pgtable-arm: Move some definitions to a header 2020-09-28 23:48:06 +01:00
io-pgtable-arm.h iommu/io-pgtable-arm: Move some definitions to a header 2020-09-28 23:48:06 +01:00
io-pgtable.c
ioasid.c
iommu-debugfs.c
iommu-sysfs.c
iommu-traces.c
iommu.c iommu/uapi: Handle data and argsz filled by users 2020-10-01 14:52:46 +02:00
iova.c iommu/iova: Replace cmpxchg with xchg in queue_iova 2020-09-04 12:11:06 +02:00
ipmmu-vmsa.c IOMMU Updates for Linux v5.9 2020-08-11 14:13:24 -07:00
irq_remapping.c
irq_remapping.h
Kconfig Merge branches 'arm/allwinner', 'arm/mediatek', 'arm/renesas', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/amd', 'x86/vt-d' and 'core' into next 2020-10-07 11:51:59 +02:00
Makefile More Arm SMMU updates for 5.9 2020-07-29 14:47:37 +02:00
msm_iommu.c iommu: Add gfp parameter to io_pgtable_ops->map() 2020-07-24 14:29:47 +02:00
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c iommu/mediatek: Add support for MT8167 2020-09-18 10:29:12 +02:00
mtk_iommu.h iommu/mediatek: Add support for MT8167 2020-09-18 10:29:12 +02:00
mtk_iommu_v1.c iommu/mediatek: Do no use dev->archdata.iommu 2020-06-30 11:59:48 +02:00
of_iommu.c of/device: Add input id to of_dma_configure() 2020-07-28 15:51:32 +01:00
omap-iommu-debug.c iommu/omap: Check for failure of a call to omap_iommu_dump_ctx 2020-07-22 15:02:33 +02:00
omap-iommu.c Merge branches 'arm/renesas', 'arm/qcom', 'arm/mediatek', 'arm/omap', 'arm/exynos', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'core' into next 2020-07-29 14:42:00 +02:00
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c iommu/rockchip: Use dev_iommu_priv_get/set() 2020-06-30 11:59:48 +02:00
s390-iommu.c s390 updates for the 5.8 merge window 2020-06-08 12:05:31 -07:00
sun50i-iommu.c iommu/sun50i: Fix set-but-not-used variable warning 2020-09-04 13:39:45 +02:00
tegra-gart.c iommu/tegra: Use dev_iommu_priv_get/set() 2020-06-30 11:59:48 +02:00
tegra-smmu.c iommu/tegra-smmu: Allow to group clients in same swgroup 2020-09-24 12:32:32 +02:00
virtio-iommu.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00