alistair23-linux/drivers/iommu
Robin Murphy 2c3d273eab iommu/io-pgtable-arm: Support lockless operation
For parallel I/O with multiple concurrent threads servicing the same
device (or devices, if several share a domain), serialising page table
updates becomes a massive bottleneck. On reflection, though, we don't
strictly need to do that - for valid IOMMU API usage, there are in fact
only two races that we need to guard against: multiple map requests for
different blocks within the same region, when the intermediate-level
table for that region does not yet exist; and multiple unmaps of
different parts of the same block entry. Both of those are fairly easily
solved by using a cmpxchg to install the new table, such that if we then
find that someone else's table got there first, we can simply free ours
and continue.

Make the requisite changes such that we can withstand being called
without the caller maintaining a lock. In theory, this opens up a few
corners in which wildly misbehaving callers making nonsensical
overlapping requests might lead to crashes instead of just unpredictable
results, but correct code really does not deserve to pay a significant
performance cost for the sake of masking bugs in theoretical broken code.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-06-23 17:58:00 +01:00
..
amd_iommu.c x86/events, drivers/iommu/amd: Introduce amd_iommu_get_num_iommus() 2017-03-30 09:53:53 +02:00
amd_iommu_init.c x86/events, drivers/amd/iommu: Prepare for multiple IOMMUs support 2017-03-30 09:53:55 +02:00
amd_iommu_proto.h x86/events, drivers/amd/iommu: Prepare for multiple IOMMUs support 2017-03-30 09:53:55 +02:00
amd_iommu_types.h x86/events, drivers/iommu/amd: Introduce amd_iommu_get_num_iommus() 2017-03-30 09:53:53 +02:00
amd_iommu_v2.c iommu/amd: Fix incorrect error handling in amd_iommu_bind_pasid() 2017-04-24 12:33:34 +02:00
arm-smmu-v3.c iommu/io-pgtable: Introduce explicit coherency 2017-06-23 17:58:00 +01:00
arm-smmu.c iommu/io-pgtable: Introduce explicit coherency 2017-06-23 17:58:00 +01:00
dma-iommu.c iommu/dma: Plumb in the per-CPU IOVA caches 2017-04-03 12:45:03 +02:00
dmar.c iommu/dmar: Remove redundant ' != 0' when check return code 2017-03-22 15:42:17 +01:00
exynos-iommu.c Merge branches 'arm/exynos', 'arm/omap', 'arm/rockchip', 'arm/mediatek', 'arm/smmu', 'arm/core', 'x86/vt-d', 'x86/amd' and 'core' into next 2017-05-04 18:06:17 +02:00
fsl_pamu.c
fsl_pamu.h iommu: Remove pci.h include from trace/events/iommu.h 2017-04-29 00:20:49 +02:00
fsl_pamu_domain.c
fsl_pamu_domain.h
intel-iommu.c Merge branches 'arm/exynos', 'arm/omap', 'arm/rockchip', 'arm/mediatek', 'arm/smmu', 'arm/core', 'x86/vt-d', 'x86/amd' and 'core' into next 2017-05-04 18:06:17 +02:00
intel-svm.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/mm.h> 2017-03-02 08:42:28 +01:00
intel_irq_remapping.c iommu/vt-d: Don't print the failure message when booting non-kdump kernel 2017-04-28 23:38:42 +02:00
io-pgtable-arm-v7s.c iommu/io-pgtable: Introduce explicit coherency 2017-06-23 17:58:00 +01:00
io-pgtable-arm.c iommu/io-pgtable-arm: Support lockless operation 2017-06-23 17:58:00 +01:00
io-pgtable.c
io-pgtable.h iommu/io-pgtable: Introduce explicit coherency 2017-06-23 17:58:00 +01:00
iommu-sysfs.c iommu: Make iommu_device_link/unlink take a struct iommu_device 2017-02-10 13:44:57 +01:00
iommu-traces.c
iommu.c Merge branches 'arm/exynos', 'arm/omap', 'arm/rockchip', 'arm/mediatek', 'arm/smmu', 'arm/core', 'x86/vt-d', 'x86/amd' and 'core' into next 2017-05-04 18:06:17 +02:00
iova.c Merge branches 'arm/exynos', 'arm/omap', 'arm/rockchip', 'arm/mediatek', 'arm/smmu', 'arm/core', 'x86/vt-d', 'x86/amd' and 'core' into next 2017-05-04 18:06:17 +02:00
ipmmu-vmsa.c iommu/ipmmu-vmsa: Restrict IOMMU Domain Geometry to 32-bit address space 2017-02-06 13:09:43 +01:00
irq_remapping.c
irq_remapping.h
Kconfig vfio: ccw: basic implementation for vfio_ccw driver 2017-03-31 12:55:04 +02: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
msm_iommu.c iommu: Remove iommu_register_instance interface 2017-02-10 14:54:37 +01:00
msm_iommu.h iommu/msm: Make use of iommu_device_register interface 2017-02-10 13:44:57 +01:00
msm_iommu_hw-8xxx.h
mtk_iommu.c iommu: Remove iommu_register_instance interface 2017-02-10 14:54:37 +01:00
mtk_iommu.h iommu/mediatek: Make use of iommu_device_register interface 2017-02-10 13:44:57 +01:00
mtk_iommu_v1.c iommu/mediatek: Teach MTK-IOMMUv1 about 'struct iommu_device' 2017-04-03 13:17:02 +02:00
of_iommu.c iommu: of: Handle IOMMU lookup failure with deferred probing or error 2017-04-20 16:31:07 +02:00
omap-iommu-debug.c
omap-iommu.c iommu/omap: Add iommu-group support 2017-04-20 16:33:59 +02:00
omap-iommu.h iommu/omap: Add iommu-group support 2017-04-20 16:33:59 +02:00
omap-iopgtable.h
rockchip-iommu.c Merge branches 'arm/exynos', 'arm/omap', 'arm/rockchip', 'arm/mediatek', 'arm/smmu', 'arm/core', 'x86/vt-d', 'x86/amd' and 'core' into next 2017-05-04 18:06:17 +02:00
s390-iommu.c iommu/s390: Drop duplicate header pci.h 2016-11-29 17:37:58 +01:00
tegra-gart.c
tegra-smmu.c iommu: Remove pci.h include from trace/events/iommu.h 2017-04-29 00:20:49 +02:00