1
0
Fork 0
remarkable-linux/drivers/iommu
Robin Murphy e6a897a684 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:29:53 +01:00
..
Kconfig iommu/arm-smmu: Support non-PCI devices with SMMUv3 2016-09-16 09:34:17 +01:00
Makefile Merge branches 'x86/amd', 'x86/vt-d', 'arm/exynos', 'arm/mediatek', 'arm/msm', 'arm/rockchip', 'arm/smmu' and 'core' into next 2016-07-26 16:02:37 +02:00
amd_iommu.c iommu/amd: Limit the IOVA page range to the specified addresses 2017-12-20 10:07:29 +01:00
amd_iommu_init.c iommu/amd: Use standard bitmap operation to set bitmap 2016-09-19 15:49:01 +02:00
amd_iommu_proto.h Merge branch 'x86/amd-avic' into x86/amd 2016-09-05 12:43:16 +02:00
amd_iommu_types.h KVM updates for v4.9-rc1 2016-10-06 10:49:01 -07:00
amd_iommu_v2.c iommu/amd: Fix incorrect error handling in amd_iommu_bind_pasid() 2017-07-05 14:40:30 +02:00
arm-smmu-v3.c iommu/arm-smmu-v3: Cope with duplicated Stream IDs 2018-01-10 09:29:53 +01:00
arm-smmu.c iommu/arm-smmu: Set privileged attribute to 'default' instead of 'unprivileged' 2017-10-08 10:26:06 +02:00
dma-iommu.c iommu/dma: Don't reserve PCI I/O windows 2017-07-05 14:40:30 +02:00
dmar.c iommu/vt-d: Fix IOMMU lookup for SR-IOV Virtual Functions 2016-10-30 05:32:51 -06:00
exynos-iommu.c iommu/exynos: Workaround FLPD cache flush issues for SYSMMU v5 2017-12-25 14:23:39 +01:00
fsl_pamu.c powerpc/fsl: Move fsl_guts.h out of arch/powerpc 2015-10-21 18:05:50 -05:00
fsl_pamu.h iommu/fsl: Various cleanups 2015-02-03 18:47:18 +01:00
fsl_pamu_domain.c iommu/fsl: Convert to device_group call-back 2015-10-22 00:00:49 +02:00
fsl_pamu_domain.h iommu/fsl: Make use of domain_alloc and domain_free 2015-03-31 15:32:14 +02:00
intel-iommu.c iommu/vt-d: Fix scatterlist offset handling 2017-12-14 09:28:13 +01:00
intel-svm.c iommu/vt-d: Fix PASID table allocation 2016-11-19 09:42:35 -08:00
intel_irq_remapping.c SVM fixes for Linux 4.5 2016-02-16 08:04:06 -08:00
io-pgtable-arm-v7s.c iommu/io-pgtable-arm-v7s: Check for leaf entry before dereferencing it 2017-12-20 10:07:19 +01:00
io-pgtable-arm.c iommu/io-pgtable-arm: Check for leaf entry before dereferencing it 2017-10-08 10:26:10 +02:00
io-pgtable.c iommu/io-pgtable: Fix a brace coding style issue. 2016-04-05 15:34:29 +02:00
io-pgtable.h iommu/io-pgtable: Add MTK 4GB mode in Short-descriptor 2016-04-05 15:39:37 +02:00
iommu-sysfs.c iommu: Fix compile error in iommu-sysfs.c 2014-07-07 12:01:21 +02:00
iommu-traces.c iommu: Add iommu_error class event to iommu trace 2013-09-25 11:07:04 +02:00
iommu.c iommu: Handle default domain attach failure 2017-07-05 14:40:30 +02:00
iova.c iommu/iova: Disable preemption around use of this_cpu_ptr() 2016-06-27 13:07:45 +02:00
ipmmu-vmsa.c iommu/ipmmu-vmsa: Fix wrong error handle of ipmmu_add_device 2016-09-05 12:53:58 +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
msm_iommu.c iommu/msm: use generic ARMV7S short descriptor pagetable ops 2016-06-21 13:57:13 +02:00
msm_iommu.h iommu/msm: Add DT adaptation 2016-06-21 13:56:00 +02:00
msm_iommu_hw-8xxx.h iommu/msm: Move mach includes to iommu directory 2013-08-06 11:18:03 -07:00
mtk_iommu.c iommu/mediatek: move the common struct into header file 2016-06-21 11:36:19 +02:00
mtk_iommu.h iommu/mediatek: Mark static functions in headers inline 2016-08-09 15:46:46 +02:00
mtk_iommu_v1.c iommu/mediatek: Fix driver name 2017-12-20 10:07:28 +01:00
of_iommu.c iommu: Introduce iommu_fwspec 2016-09-16 09:34:15 +01: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 WARN_ON for page table alignment check 2016-04-05 17:53:20 +02:00
omap-iommu.h iommu/omap: Add support for configuring dsp iommus on DRA7xx 2015-10-14 14:35:47 +02:00
omap-iopgtable.h iommu/omap: Use BIT(x) macros in omap-iopgtable.h 2015-08-03 16:04:42 +02:00
rockchip-iommu.c iommu/rockchip: Prepare to support generic DMA mapping 2016-06-27 14:50:08 +02:00
s390-iommu.c iommu/s390: simplify registration of I/O address translation parameters 2016-09-22 13:42:28 +02:00
tegra-gart.c Merge branches 'iommu/fixes', 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/tegra' and 'core' into next 2015-04-02 13:33:19 +02:00
tegra-smmu.c iommu/tegra-smmu: Parameterize number of TLB lines 2015-08-13 17:05:28 +02:00