Skip to content

Commit e95adb9

Browse files
committed
Merge branches 'arm/omap', 'arm/exynos', 'arm/smmu', 'arm/mediatek', 'arm/qcom', 'arm/renesas', 'x86/amd', 'x86/vt-d' and 'core' into next
10 parents f74c2bb + 96088a2 + 7991eb3 + 097a7df + 4c00889 + 8758553 + 3623002 + 3d70889 + 1f76249 + 2896ba4 commit e95adb9

Some content is hidden

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

63 files changed

+3851
-1472
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1732,6 +1732,11 @@
17321732
Note that using this option lowers the security
17331733
provided by tboot because it makes the system
17341734
vulnerable to DMA attacks.
1735+
nobounce [Default off]
1736+
Disable bounce buffer for unstrusted devices such as
1737+
the Thunderbolt devices. This will treat the untrusted
1738+
devices as the trusted ones, hence might expose security
1739+
risks of DMA attacks.
17351740

17361741
intel_idle.max_cstate= [KNL,HW,ACPI,X86]
17371742
0 disables intel_idle and fall back on acpi_idle.
@@ -1811,7 +1816,7 @@
18111816
synchronously.
18121817

18131818
iommu.passthrough=
1814-
[ARM64] Configure DMA to bypass the IOMMU by default.
1819+
[ARM64, X86] Configure DMA to bypass the IOMMU by default.
18151820
Format: { "0" | "1" }
18161821
0 - Use IOMMU translation for DMA.
18171822
1 - Bypass the IOMMU for DMA.

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

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,23 @@ ARM Short-Descriptor translation table format for address translation.
1111
|
1212
m4u (Multimedia Memory Management Unit)
1313
|
14+
+--------+
15+
| |
16+
gals0-rx gals1-rx (Global Async Local Sync rx)
17+
| |
18+
| |
19+
gals0-tx gals1-tx (Global Async Local Sync tx)
20+
| | Some SoCs may have GALS.
21+
+--------+
22+
|
1423
SMI Common(Smart Multimedia Interface Common)
1524
|
1625
+----------------+-------
1726
| |
27+
| gals-rx There may be GALS in some larbs.
28+
| |
29+
| |
30+
| gals-tx
1831
| |
1932
SMI larb0 SMI larb1 ... SoCs have several SMI local arbiter(larb).
2033
(display) (vdec)
@@ -36,6 +49,10 @@ each local arbiter.
3649
like display, video decode, and camera. And there are different ports
3750
in each larb. Take a example, There are many ports like MC, PP, VLD in the
3851
video decode local arbiter, all these ports are according to the video HW.
52+
In some SoCs, there may be a GALS(Global Async Local Sync) module between
53+
smi-common and m4u, and additional GALS module between smi-larb and
54+
smi-common. GALS can been seen as a "asynchronous fifo" which could help
55+
synchronize for the modules in different clock frequency.
3956

4057
Required properties:
4158
- compatible : must be one of the following string:
@@ -44,18 +61,25 @@ Required properties:
4461
"mediatek,mt7623-m4u", "mediatek,mt2701-m4u" for mt7623 which uses
4562
generation one m4u HW.
4663
"mediatek,mt8173-m4u" for mt8173 which uses generation two m4u HW.
64+
"mediatek,mt8183-m4u" for mt8183 which uses generation two m4u HW.
4765
- reg : m4u register base and size.
4866
- interrupts : the interrupt of m4u.
4967
- clocks : must contain one entry for each clock-names.
50-
- clock-names : must be "bclk", It is the block clock of m4u.
68+
- clock-names : Only 1 optional clock:
69+
- "bclk": the block clock of m4u.
70+
Here is the list which require this "bclk":
71+
- mt2701, mt2712, mt7623 and mt8173.
72+
Note that m4u use the EMI clock which always has been enabled before kernel
73+
if there is no this "bclk".
5174
- mediatek,larbs : List of phandle to the local arbiters in the current Socs.
5275
Refer to bindings/memory-controllers/mediatek,smi-larb.txt. It must sort
5376
according to the local arbiter index, like larb0, larb1, larb2...
5477
- iommu-cells : must be 1. This is the mtk_m4u_id according to the HW.
5578
Specifies the mtk_m4u_id as defined in
5679
dt-binding/memory/mt2701-larb-port.h for mt2701, mt7623
57-
dt-binding/memory/mt2712-larb-port.h for mt2712, and
58-
dt-binding/memory/mt8173-larb-port.h for mt8173.
80+
dt-binding/memory/mt2712-larb-port.h for mt2712,
81+
dt-binding/memory/mt8173-larb-port.h for mt8173, and
82+
dt-binding/memory/mt8183-larb-port.h for mt8183.
5983

6084
Example:
6185
iommu: iommu@10205000 {

Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ SMI (Smart Multimedia Interface) Common
22

33
The hardware block diagram please check bindings/iommu/mediatek,iommu.txt
44

5-
Mediatek SMI have two generations of HW architecture, mt2712 and mt8173 use
6-
the second generation of SMI HW while mt2701 uses the first generation HW of
7-
SMI.
5+
Mediatek SMI have two generations of HW architecture, here is the list
6+
which generation the SoCs use:
7+
generation 1: mt2701 and mt7623.
8+
generation 2: mt2712, mt8173 and mt8183.
89

910
There's slight differences between the two SMI, for generation 2, the
1011
register which control the iommu port is at each larb's register base. But
@@ -19,6 +20,7 @@ Required properties:
1920
"mediatek,mt2712-smi-common"
2021
"mediatek,mt7623-smi-common", "mediatek,mt2701-smi-common"
2122
"mediatek,mt8173-smi-common"
23+
"mediatek,mt8183-smi-common"
2224
- reg : the register and size of the SMI block.
2325
- power-domains : a phandle to the power domain of this local arbiter.
2426
- clocks : Must contain an entry for each entry in clock-names.
@@ -30,6 +32,10 @@ Required properties:
3032
They may be the same if both source clocks are the same.
3133
- "async" : asynchronous clock, it help transform the smi clock into the emi
3234
clock domain, this clock is only needed by generation 1 smi HW.
35+
and these 2 option clocks for generation 2 smi HW:
36+
- "gals0": the path0 clock of GALS(Global Async Local Sync).
37+
- "gals1": the path1 clock of GALS(Global Async Local Sync).
38+
Here is the list which has this GALS: mt8183.
3339

3440
Example:
3541
smi_common: smi@14022000 {

Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Required properties:
88
"mediatek,mt2712-smi-larb"
99
"mediatek,mt7623-smi-larb", "mediatek,mt2701-smi-larb"
1010
"mediatek,mt8173-smi-larb"
11+
"mediatek,mt8183-smi-larb"
1112
- reg : the register and size of this local arbiter.
1213
- mediatek,smi : a phandle to the smi_common node.
1314
- power-domains : a phandle to the power domain of this local arbiter.
@@ -16,6 +17,9 @@ Required properties:
1617
- "apb" : Advanced Peripheral Bus clock, It's the clock for setting
1718
the register.
1819
- "smi" : It's the clock for transfer data and command.
20+
and this optional clock name:
21+
- "gals": the clock for GALS(Global Async Local Sync).
22+
Here is the list which has this GALS: mt8183.
1923

2024
Required property for mt2701, mt2712 and mt7623:
2125
- mediatek,larb-id :the hardware id of this larb.

MAINTAINERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,8 +1350,7 @@ M: Will Deacon <[email protected]>
13501350
R: Robin Murphy <[email protected]>
13511351
L: [email protected] (moderated for non-subscribers)
13521352
S: Maintained
1353-
F: drivers/iommu/arm-smmu.c
1354-
F: drivers/iommu/arm-smmu-v3.c
1353+
F: drivers/iommu/arm-smmu*
13551354
F: drivers/iommu/io-pgtable-arm.c
13561355
F: drivers/iommu/io-pgtable-arm-v7s.c
13571356

arch/arm/mach-omap2/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,3 +229,5 @@ include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORC
229229
$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
230230

231231
targets += pm-asm-offsets.s
232+
233+
obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o

arch/arm/mach-omap2/omap-iommu.c

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
/*
3+
* OMAP IOMMU quirks for various TI SoCs
4+
*
5+
* Copyright (C) 2015-2019 Texas Instruments Incorporated - http://www.ti.com/
6+
* Suman Anna <[email protected]>
7+
*/
8+
9+
#include <linux/platform_device.h>
10+
#include <linux/err.h>
11+
12+
#include "omap_hwmod.h"
13+
#include "omap_device.h"
14+
#include "powerdomain.h"
15+
16+
int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request,
17+
u8 *pwrst)
18+
{
19+
struct powerdomain *pwrdm;
20+
struct omap_device *od;
21+
u8 next_pwrst;
22+
23+
od = to_omap_device(pdev);
24+
if (!od)
25+
return -ENODEV;
26+
27+
if (od->hwmods_cnt != 1)
28+
return -EINVAL;
29+
30+
pwrdm = omap_hwmod_get_pwrdm(od->hwmods[0]);
31+
if (!pwrdm)
32+
return -EINVAL;
33+
34+
if (request)
35+
*pwrst = pwrdm_read_next_pwrst(pwrdm);
36+
37+
if (*pwrst > PWRDM_POWER_RET)
38+
return 0;
39+
40+
next_pwrst = request ? PWRDM_POWER_ON : *pwrst;
41+
42+
return pwrdm_set_next_pwrst(pwrdm, next_pwrst);
43+
}

arch/ia64/include/asm/iommu.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
extern void no_iommu_init(void);
99
#ifdef CONFIG_INTEL_IOMMU
1010
extern int force_iommu, no_iommu;
11-
extern int iommu_pass_through;
1211
extern int iommu_detected;
1312
#else
14-
#define iommu_pass_through (0)
1513
#define no_iommu (1)
1614
#define iommu_detected (0)
1715
#endif

arch/ia64/kernel/pci-dma.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ int force_iommu __read_mostly = 1;
2222
int force_iommu __read_mostly;
2323
#endif
2424

25-
int iommu_pass_through;
26-
2725
static int __init pci_iommu_init(void)
2826
{
2927
if (iommu_detected)

arch/x86/include/asm/iommu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
extern int force_iommu, no_iommu;
66
extern int iommu_detected;
7-
extern int iommu_pass_through;
87

98
/* 10 seconds */
109
#define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000)

0 commit comments

Comments
 (0)