aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-05 18:59:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-05 18:59:35 -0400
commitdc7aafba6bfa1ea5806c6ac402e690682f950f75 (patch)
tree01b8dbd05444d2de91cf9058a596e40c3cbc2a6d
parent161d2e0a195292a8a67b0f5c48e12a9984f75dac (diff)
parent4c5e9d9f0ddf5d4ba9c51eee2ef1a4d6e93ccf56 (diff)
Merge tag 'iommu-updates-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull iommu updates from Joerg Roedel: "This time with: - support for the generic PCI device alias code in x86 IOMMU drivers - a new sysfs interface for IOMMUs - preparations for hotplug support in the Intel IOMMU driver - change the AMD IOMMUv2 driver to not hold references to core data structures like mm_struct or task_struct. Rely on mmu_notifers instead. - removal of the OMAP IOVMM interface, all users of it are converted to DMA-API now - make the struct iommu_ops const everywhere - initial PCI support for the ARM SMMU driver - there is now a generic device tree binding documented for ARM IOMMUs - various fixes and cleanups all over the place Also included are some changes to the OMAP code, which are acked by the maintainer" * tag 'iommu-updates-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (67 commits) devicetree: Add generic IOMMU device tree bindings iommu/vt-d: Fix race setting IRQ CPU affinity while freeing IRQ iommu/amd: Fix 2 typos in comments iommu/amd: Fix device_state reference counting iommu/amd: Remove change_pte mmu_notifier call-back iommu/amd: Don't set pasid_state->mm to NULL in unbind_pasid iommu/exynos: Select ARM_DMA_USE_IOMMU iommu/vt-d: Exclude devices using RMRRs from IOMMU API domains iommu/omap: Remove platform data da_start and da_end fields ARM: omap: Don't set iommu pdata da_start and da_end fields iommu/omap: Remove virtual memory manager iommu/vt-d: Fix issue in computing domain's iommu_snooping flag iommu/vt-d: Introduce helper function iova_size() to improve code readability iommu/vt-d: Introduce helper domain_pfn_within_range() to simplify code iommu/vt-d: Simplify intel_unmap_sg() and kill duplicated code iommu/vt-d: Change iommu_enable/disable_translation to return void iommu/vt-d: Simplify include/linux/dmar.h iommu/vt-d: Avoid freeing virtual machine domain in free_dmar_iommu() iommu/vt-d: Fix possible invalid memory access caused by free_dmar_iommu() iommu/vt-d: Allocate dynamic domain id for virtual domains only ...
-rw-r--r--Documentation/ABI/testing/sysfs-class-iommu17
-rw-r--r--Documentation/ABI/testing/sysfs-class-iommu-amd-iommu14
-rw-r--r--Documentation/ABI/testing/sysfs-class-iommu-intel-iommu32
-rw-r--r--Documentation/devicetree/bindings/iommu/arm,smmu.txt6
-rw-r--r--Documentation/devicetree/bindings/iommu/iommu.txt182
-rw-r--r--arch/arm/mach-omap2/omap-iommu.c2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c4
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c4
-rw-r--r--drivers/iommu/Kconfig13
-rw-r--r--drivers/iommu/Makefile2
-rw-r--r--drivers/iommu/amd_iommu.c224
-rw-r--r--drivers/iommu/amd_iommu_init.c38
-rw-r--r--drivers/iommu/amd_iommu_types.h10
-rw-r--r--drivers/iommu/amd_iommu_v2.c107
-rw-r--r--drivers/iommu/arm-smmu.c495
-rw-r--r--drivers/iommu/dmar.c12
-rw-r--r--drivers/iommu/exynos-iommu.c2
-rw-r--r--drivers/iommu/fsl_pamu.c2
-rw-r--r--drivers/iommu/fsl_pamu_domain.c73
-rw-r--r--drivers/iommu/intel-iommu.c874
-rw-r--r--drivers/iommu/intel_irq_remapping.c60
-rw-r--r--drivers/iommu/iommu-sysfs.c134
-rw-r--r--drivers/iommu/iommu.c201
-rw-r--r--drivers/iommu/ipmmu-vmsa.c2
-rw-r--r--drivers/iommu/msm_iommu.c2
-rw-r--r--drivers/iommu/omap-iommu-debug.c114
-rw-r--r--drivers/iommu/omap-iommu.c15
-rw-r--r--drivers/iommu/omap-iommu.h8
-rw-r--r--drivers/iommu/omap-iovmm.c791
-rw-r--r--drivers/iommu/pci.h29
-rw-r--r--drivers/iommu/shmobile-iommu.c2
-rw-r--r--drivers/iommu/tegra-gart.c2
-rw-r--r--drivers/iommu/tegra-smmu.c2
-rw-r--r--include/linux/amd-iommu.h7
-rw-r--r--include/linux/device.h2
-rw-r--r--include/linux/dmar.h50
-rw-r--r--include/linux/intel-iommu.h3
-rw-r--r--include/linux/iommu.h32
-rw-r--r--include/linux/iova.h5
-rw-r--r--include/linux/omap-iommu.h37
-rw-r--r--include/linux/platform_data/iommu-omap.h6
41 files changed, 1567 insertions, 2050 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-iommu b/Documentation/ABI/testing/sysfs-class-iommu
new file mode 100644
index 000000000000..6d0a1b4be82d
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-iommu
@@ -0,0 +1,17 @@
1What: /sys/class/iommu/<iommu>/devices/
2Date: June 2014
3KernelVersion: 3.17
4Contact: Alex Williamson <alex.williamson@redhat.com>
5Description:
6 IOMMU drivers are able to link devices managed by a
7 given IOMMU here to allow association of IOMMU to
8 device.
9
10What: /sys/devices/.../iommu
11Date: June 2014
12KernelVersion: 3.17
13Contact: Alex Williamson <alex.williamson@redhat.com>
14Description:
15 IOMMU drivers are able to link the IOMMU for a
16 given device here to allow association of device to
17 IOMMU.
diff --git a/Documentation/ABI/testing/sysfs-class-iommu-amd-iommu b/Documentation/ABI/testing/sysfs-class-iommu-amd-iommu
new file mode 100644
index 000000000000..d6ba8e8a4a97
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-iommu-amd-iommu
@@ -0,0 +1,14 @@
1What: /sys/class/iommu/<iommu>/amd-iommu/cap
2Date: June 2014
3KernelVersion: 3.17
4Contact: Alex Williamson <alex.williamson@redhat.com>
5Description:
6 IOMMU capability header as documented in the AMD IOMMU
7 specification. Format: %x
8
9What: /sys/class/iommu/<iommu>/amd-iommu/features
10Date: June 2014
11KernelVersion: 3.17
12Contact: Alex Williamson <alex.williamson@redhat.com>
13Description:
14 Extended features of the IOMMU. Format: %llx
diff --git a/Documentation/ABI/testing/sysfs-class-iommu-intel-iommu b/Documentation/ABI/testing/sysfs-class-iommu-intel-iommu
new file mode 100644
index 000000000000..258cc246d98e
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-iommu-intel-iommu
@@ -0,0 +1,32 @@
1What: /sys/class/iommu/<iommu>/intel-iommu/address
2Date: June 2014
3KernelVersion: 3.17
4Contact: Alex Williamson <alex.williamson@redhat.com>
5Description:
6 Physical address of the VT-d DRHD for this IOMMU.
7 Format: %llx. This allows association of a sysfs
8 intel-iommu with a DMAR DRHD table entry.
9
10What: /sys/class/iommu/<iommu>/intel-iommu/cap
11Date: June 2014
12KernelVersion: 3.17
13Contact: Alex Williamson <alex.williamson@redhat.com>
14Description:
15 The cached hardware capability register value
16 of this DRHD unit. Format: %llx.
17
18What: /sys/class/iommu/<iommu>/intel-iommu/ecap
19Date: June 2014
20KernelVersion: 3.17
21Contact: Alex Williamson <alex.williamson@redhat.com>
22Description:
23 The cached hardware extended capability register
24 value of this DRHD unit. Format: %llx.
25
26What: /sys/class/iommu/<iommu>/intel-iommu/version
27Date: June 2014
28KernelVersion: 3.17
29Contact: Alex Williamson <alex.williamson@redhat.com>
30Description:
31 The architecture version as reported from the
32 VT-d VER_REG. Format: %d:%d, major:minor
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.txt b/Documentation/devicetree/bindings/iommu/arm,smmu.txt
index f284b99402bc..2d0f7cd867ea 100644
--- a/Documentation/devicetree/bindings/iommu/arm,smmu.txt
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu.txt
@@ -42,12 +42,6 @@ conditions.
42 42
43** System MMU optional properties: 43** System MMU optional properties:
44 44
45- smmu-parent : When multiple SMMUs are chained together, this
46 property can be used to provide a phandle to the
47 parent SMMU (that is the next SMMU on the path going
48 from the mmu-masters towards memory) node for this
49 SMMU.
50
51- calxeda,smmu-secure-config-access : Enable proper handling of buggy 45- calxeda,smmu-secure-config-access : Enable proper handling of buggy
52 implementations that always use secure access to 46 implementations that always use secure access to
53 SMMU configuration registers. In this case non-secure 47 SMMU configuration registers. In this case non-secure
diff --git a/Documentation/devicetree/bindings/iommu/iommu.txt b/Documentation/devicetree/bindings/iommu/iommu.txt
new file mode 100644
index 000000000000..5a8b4624defc
--- /dev/null
+++ b/Documentation/devicetree/bindings/iommu/iommu.txt
@@ -0,0 +1,182 @@
1This document describes the generic device tree binding for IOMMUs and their
2master(s).
3
4
5IOMMU device node:
6==================
7
8An IOMMU can provide the following services:
9
10* Remap address space to allow devices to access physical memory ranges that
11 they otherwise wouldn't be capable of accessing.
12
13 Example: 32-bit DMA to 64-bit physical addresses
14
15* Implement scatter-gather at page level granularity so that the device does
16 not have to.
17
18* Provide system protection against "rogue" DMA by forcing all accesses to go
19 through the IOMMU and faulting when encountering accesses to unmapped
20 address regions.
21
22* Provide address space isolation between multiple contexts.
23