linux-brain/drivers/iommu
Robin Murphy 986128f3a7 iommu/arm-smmu-v3: Cope with duplicated Stream IDs
commit 563b5cbe33 upstream.

For PCI devices behind an aliasing PCIe-to-PCI/X bridge, the bridge
alias to DevFn 0.0 on the subordinate bus may match the original RID of
the device, resulting in the same SID being present in the device's
fwspec twice. This causes trouble later in arm_smmu_write_strtab_ent()
when we wind up visiting the STE a second time and find it already live.

Avoid the issue by giving arm_smmu_install_ste_for_dev() the cleverness
to skip over duplicates. It seems mildly counterintuitive compared to
preventing the duplicates from existing in the first place, but since
the DT and ACPI probe paths build their fwspecs differently, this is
actually the cleanest and most self-contained way to deal with it.

Fixes: 8f78515425 ("iommu/arm-smmu: Implement of_xlate() for SMMUv3")
Reported-by: Tomasz Nowicki <tomasz.nowicki@caviumnetworks.com>
Tested-by: Tomasz Nowicki <Tomasz.Nowicki@cavium.com>
Tested-by: Jayachandran C. <jnair@caviumnetworks.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10 09:31:21 +01:00
..
amd_iommu_init.c iommu/amd: pr_err() strings should end with newlines 2017-09-27 17:01:35 +02:00
amd_iommu_proto.h IOMMU Updates for Linux v4.14 2017-09-09 15:03:24 -07:00
amd_iommu_types.h IOMMU Updates for Linux v4.14 2017-09-09 15:03:24 -07:00
amd_iommu_v2.c IOMMU Updates for Linux v4.14 2017-09-09 15:03:24 -07:00
amd_iommu.c iommu/amd: Limit the IOVA page range to the specified addresses 2017-12-20 10:10:26 +01:00
arm-smmu-regs.h iommu/arm-smmu: Split out register defines 2017-08-15 17:34:48 +02:00
arm-smmu-v3.c iommu/arm-smmu-v3: Cope with duplicated Stream IDs 2018-01-10 09:31:21 +01:00
arm-smmu.c Merge branches 'arm/exynos', 'arm/renesas', 'arm/rockchip', 'arm/omap', 'arm/mediatek', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd', 's390' and 'core' into next 2017-09-01 11:31:42 +02:00
dma-iommu.c IOMMU Updates for Linux v4.13 2017-07-12 10:00:04 -07:00
dmar.c iommu/vt-d: Fix harmless section mismatch warning 2017-09-19 11:44:46 +02:00
exynos-iommu.c iommu/exynos: Remove initconst attribute to avoid potential kernel oops 2017-10-12 10:25:11 +02:00
fsl_pamu_domain.c Merge branches 'arm/exynos', 'arm/renesas', 'arm/rockchip', 'arm/omap', 'arm/mediatek', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd', 's390' and 'core' into next 2017-09-01 11:31:42 +02:00
fsl_pamu_domain.h iommu/pamu: Fix PAMU boot crash 2017-08-23 16:28:09 +02:00
fsl_pamu.c Merge branches 'arm/exynos', 'arm/renesas', 'arm/rockchip', 'arm/omap', 'arm/mediatek', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd', 's390' and 'core' into next 2017-09-01 11:31:42 +02:00
fsl_pamu.h iommu/pamu: Fix PAMU boot crash 2017-08-23 16:28:09 +02:00
intel_irq_remapping.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
intel-iommu.c iommu/vt-d: Fix scatterlist offset handling 2017-12-14 09:52:55 +01:00
intel-svm.c IOMMU Updates for Linux v4.14 2017-09-09 15:03:24 -07:00
io-pgtable-arm-v7s.c iommu/io-pgtable-arm-v7s: Need dma-sync while there is no QUIRK_NO_DMA 2017-09-27 16:56:17 +02:00
io-pgtable-arm.c iommu/io-pgtable: Sanitise map/unmap addresses 2017-07-20 10:30:28 +01:00
io-pgtable.c iommu/io-pgtable: Fix a brace coding style issue. 2016-04-05 15:34:29 +02:00
io-pgtable.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iommu-sysfs.c iommu: Fix wrong freeing of iommu_device->dev 2017-08-15 13:58:48 +02:00
iommu-traces.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iommu.c Merge branches 'arm/exynos', 'arm/renesas', 'arm/rockchip', 'arm/omap', 'arm/mediatek', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd', 's390' and 'core' into next 2017-09-01 11:31:42 +02:00
iova.c iommu/iova: Add flush timer 2017-08-15 18:23:52 +02:00
ipmmu-vmsa.c iommu/ipmmu-vmsa: Make ipmmu_gather_ops const 2017-08-30 15:10:53 +02:00
irq_remapping.c x86/cpufeature: Replace cpu_has_apic with boot_cpu_has() usage 2016-04-13 11:37:41 +02:00
irq_remapping.h iommu, x86: Setup Posted-Interrupts capability for Intel iommu 2015-06-12 11:33:52 +02:00
Kconfig iommu/qcom: Depend on HAS_DMA to fix compile error 2017-09-19 15:30:41 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
msm_iommu_hw-8xxx.h iommu/msm: Move mach includes to iommu directory 2013-08-06 11:18:03 -07:00
msm_iommu.c iommu/msm: Add iommu_group support 2017-08-10 00:03:50 +02:00
msm_iommu.h iommu/msm: Make use of iommu_device_register interface 2017-02-10 13:44:57 +01:00
mtk_iommu_v1.c iommu/mediatek: Fix driver name 2017-12-20 10:10:24 +01:00
mtk_iommu.c iommu/mediatek: Limit the physical address in 32bit for v7s 2017-09-27 16:58:28 +02:00
mtk_iommu.h iommu/mediatek: Merge 2 M4U HWs into one iommu domain 2017-08-22 16:37:59 +02:00
of_iommu.c iommu/of: Remove PCI host bridge node check 2017-09-22 12:05:43 +02:00
omap-iommu-debug.c iommu/omap: Align code with open parenthesis 2016-04-05 17:53:20 +02:00
omap-iommu.c iommu/omap: Use DMA-API for performing cache flushes 2017-08-04 11:59:29 +02:00
omap-iommu.h iommu/omap: Use DMA-API for performing cache flushes 2017-08-04 11:59:29 +02:00
omap-iopgtable.h iommu/omap: Use BIT(x) macros in omap-iopgtable.h 2015-08-03 16:04:42 +02:00
qcom_iommu.c iommu: qcom: annotate PM functions as __maybe_unused 2017-08-28 11:24:52 +02:00
rockchip-iommu.c Merge branches 'arm/exynos', 'arm/renesas', 'arm/rockchip', 'arm/omap', 'arm/mediatek', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd', 's390' and 'core' into next 2017-09-01 11:31:42 +02:00
s390-iommu.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tegra-gart.c iommu/tegra-gart: Add support for struct iommu_device 2017-08-17 16:31:34 +02:00
tegra-smmu.c arm/tegra: Call bus_set_iommu() after iommu_device_register() 2017-08-30 17:28:32 +02:00