Skip to content

Commit f23cdfc

Browse files
committed
Merge tag 'iommu-updates-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull iommu updates from Joerg Roedel: - remove the bus_set_iommu() interface which became unnecesary because of IOMMU per-device probing - make the dma-iommu.h header private - Intel VT-d changes from Lu Baolu: - Decouple PASID and PRI from SVA - Add ESRTPS & ESIRTPS capability check - Cleanups - Apple DART support for the M1 Pro/MAX SOCs - support for AMD IOMMUv2 page-tables for the DMA-API layer. The v2 page-tables are compatible with the x86 CPU page-tables. Using them for DMA-API prepares support for hardware-assisted IOMMU virtualization - support for MT6795 Helio X10 M4Us in the Mediatek IOMMU driver - some smaller fixes and cleanups * tag 'iommu-updates-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (59 commits) iommu/vt-d: Avoid unnecessary global DMA cache invalidation iommu/vt-d: Avoid unnecessary global IRTE cache invalidation iommu/vt-d: Rename cap_5lp_support to cap_fl5lp_support iommu/vt-d: Remove pasid_set_eafe() iommu/vt-d: Decouple PASID & PRI enabling from SVA iommu/vt-d: Remove unnecessary SVA data accesses in page fault path dt-bindings: iommu: arm,smmu-v3: Relax order of interrupt names iommu: dart: Support t6000 variant iommu/io-pgtable-dart: Add DART PTE support for t6000 iommu/io-pgtable: Add DART subpage protection support iommu/io-pgtable: Move Apple DART support to its own file iommu/mediatek: Add support for MT6795 Helio X10 M4Us iommu/mediatek: Introduce new flag TF_PORT_TO_ADDR_MT8173 dt-bindings: mediatek: Add bindings for MT6795 M4U iommu/iova: Fix module config properly iommu/amd: Fix sparse warning iommu/amd: Remove outdated comment iommu/amd: Free domain ID after domain_flush_pages iommu/amd: Free domain id in error path iommu/virtio: Fix compile error with viommu_capable() ...
2 parents 706eaca + 38713c6 commit f23cdfc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1501
-902
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@
321321
force_enable - Force enable the IOMMU on platforms known
322322
to be buggy with IOMMU enabled. Use this
323323
option with care.
324+
pgtbl_v1 - Use v1 page table for DMA-API (Default).
325+
pgtbl_v2 - Use v2 page table for DMA-API.
324326

325327
amd_iommu_dump= [HW,X86-64]
326328
Enable AMD IOMMU driver option to dump the ACPI table

Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,11 @@ properties:
3939
any others.
4040
- minItems: 1
4141
items:
42-
- enum:
43-
- eventq # Event Queue not empty
44-
- gerror # Global Error activated
45-
- const: gerror
46-
- enum:
47-
- cmdq-sync # CMD_SYNC complete
48-
- priq # PRI Queue not empty
49-
- enum:
50-
- cmdq-sync
51-
- priq
42+
enum:
43+
- eventq # Event Queue not empty
44+
- gerror # Global Error activated
45+
- cmdq-sync # CMD_SYNC complete
46+
- priq # PRI Queue not empty
5247

5348
'#iommu-cells':
5449
const: 1

Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ properties:
7373
- mediatek,mt2701-m4u # generation one
7474
- mediatek,mt2712-m4u # generation two
7575
- mediatek,mt6779-m4u # generation two
76+
- mediatek,mt6795-m4u # generation two
7677
- mediatek,mt8167-m4u # generation two
7778
- mediatek,mt8173-m4u # generation two
7879
- mediatek,mt8183-m4u # generation two
@@ -124,6 +125,7 @@ properties:
124125
dt-binding/memory/mt2701-larb-port.h for mt2701 and mt7623,
125126
dt-binding/memory/mt2712-larb-port.h for mt2712,
126127
dt-binding/memory/mt6779-larb-port.h for mt6779,
128+
dt-binding/memory/mt6795-larb-port.h for mt6795,
127129
dt-binding/memory/mt8167-larb-port.h for mt8167,
128130
dt-binding/memory/mt8173-larb-port.h for mt8173,
129131
dt-binding/memory/mt8183-larb-port.h for mt8183,
@@ -148,6 +150,7 @@ allOf:
148150
enum:
149151
- mediatek,mt2701-m4u
150152
- mediatek,mt2712-m4u
153+
- mediatek,mt6795-m4u
151154
- mediatek,mt8173-m4u
152155
- mediatek,mt8186-iommu-mm
153156
- mediatek,mt8192-m4u
@@ -177,6 +180,7 @@ allOf:
177180
contains:
178181
enum:
179182
- mediatek,mt2712-m4u
183+
- mediatek,mt6795-m4u
180184
- mediatek,mt8173-m4u
181185

182186
then:

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,7 @@ F: drivers/dma/apple-admac.c
19151915
F: drivers/i2c/busses/i2c-pasemi-core.c
19161916
F: drivers/i2c/busses/i2c-pasemi-platform.c
19171917
F: drivers/iommu/apple-dart.c
1918+
F: drivers/iommu/io-pgtable-dart.c
19181919
F: drivers/irqchip/irq-apple-aic.c
19191920
F: drivers/mailbox/apple-mailbox.c
19201921
F: drivers/nvme/host/apple.c
@@ -10689,8 +10690,8 @@ L: [email protected]
1068910690
S: Maintained
1069010691
T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
1069110692
F: drivers/iommu/dma-iommu.c
10693+
F: drivers/iommu/dma-iommu.h
1069210694
F: drivers/iommu/iova.c
10693-
F: include/linux/dma-iommu.h
1069410695
F: include/linux/iova.h
1069510696

1069610697
IOMMU SUBSYSTEM

arch/arm64/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ config ARM64
209209
select HAVE_KPROBES
210210
select HAVE_KRETPROBES
211211
select HAVE_GENERIC_VDSO
212-
select IOMMU_DMA if IOMMU_SUPPORT
213212
select IRQ_DOMAIN
214213
select IRQ_FORCED_THREADING
215214
select KASAN_VMALLOC if KASAN

arch/arm64/mm/dma-mapping.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <linux/gfp.h>
88
#include <linux/cache.h>
99
#include <linux/dma-map-ops.h>
10-
#include <linux/dma-iommu.h>
10+
#include <linux/iommu.h>
1111
#include <xen/xen.h>
1212

1313
#include <asm/cacheflush.h>

drivers/acpi/viot.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#define pr_fmt(fmt) "ACPI: VIOT: " fmt
2020

2121
#include <linux/acpi_viot.h>
22-
#include <linux/dma-iommu.h>
2322
#include <linux/fwnode.h>
2423
#include <linux/iommu.h>
2524
#include <linux/list.h>

drivers/gpu/drm/exynos/exynos_drm_dma.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// Author: Inki Dae <[email protected]>
55
// Author: Andrzej Hajda <[email protected]>
66

7-
#include <linux/dma-iommu.h>
87
#include <linux/dma-map-ops.h>
98
#include <linux/iommu.h>
109
#include <linux/platform_device.h>

drivers/iommu/Kconfig

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,17 @@ config IOMMU_IO_PGTABLE_ARMV7S_SELFTEST
6767

6868
If unsure, say N here.
6969

70+
config IOMMU_IO_PGTABLE_DART
71+
bool "Apple DART Formats"
72+
select IOMMU_IO_PGTABLE
73+
depends on ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64)
74+
help
75+
Enable support for the Apple DART pagetable formats. These include
76+
the t8020 and t6000/t8110 DART formats used in Apple M1/M2 family
77+
SoCs.
78+
79+
If unsure, say N here.
80+
7081
endmenu
7182

7283
config IOMMU_DEBUGFS
@@ -137,7 +148,7 @@ config OF_IOMMU
137148

138149
# IOMMU-agnostic DMA-mapping layer
139150
config IOMMU_DMA
140-
bool
151+
def_bool ARM64 || IA64 || X86
141152
select DMA_OPS
142153
select IOMMU_API
143154
select IOMMU_IOVA
@@ -294,7 +305,7 @@ config APPLE_DART
294305
tristate "Apple DART IOMMU Support"
295306
depends on ARCH_APPLE || (COMPILE_TEST && !GENERIC_ATOMIC64)
296307
select IOMMU_API
297-
select IOMMU_IO_PGTABLE_LPAE
308+
select IOMMU_IO_PGTABLE_DART
298309
default ARCH_APPLE
299310
help
300311
Support for Apple DART (Device Address Resolution Table) IOMMUs
@@ -476,7 +487,6 @@ config VIRTIO_IOMMU
476487
depends on VIRTIO
477488
depends on (ARM64 || X86)
478489
select IOMMU_API
479-
select IOMMU_DMA
480490
select INTERVAL_TREE
481491
select ACPI_VIOT if ACPI
482492
help

drivers/iommu/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ obj-$(CONFIG_IOMMU_DMA) += dma-iommu.o
88
obj-$(CONFIG_IOMMU_IO_PGTABLE) += io-pgtable.o
99
obj-$(CONFIG_IOMMU_IO_PGTABLE_ARMV7S) += io-pgtable-arm-v7s.o
1010
obj-$(CONFIG_IOMMU_IO_PGTABLE_LPAE) += io-pgtable-arm.o
11+
obj-$(CONFIG_IOMMU_IO_PGTABLE_DART) += io-pgtable-dart.o
1112
obj-$(CONFIG_IOASID) += ioasid.o
1213
obj-$(CONFIG_IOMMU_IOVA) += iova.o
1314
obj-$(CONFIG_OF_IOMMU) += of_iommu.o

0 commit comments

Comments
 (0)