Skip to content

Commit 0f40464

Browse files
committed
Merge tag 'irq-drivers-2025-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq driver updates from Thomas Gleixner: - Support for hard indices on RISC-V. The hart index identifies a hart (core) within a specific interrupt domain in RISC-V's Priviledged Architecture. - Rework of the RISC-V MSI driver This moves the driver over to the generic MSI library and solves the affinity problem of unmaskable PCI/MSI controllers. Unmaskable PCI/MSI controllers are prone to lose interrupts when the MSI message is updated to change the affinity because the message write consists of three 32-bit subsequent writes, which update address and data. As these writes are non-atomic versus the device raising an interrupt, the device can observe a half written update and issue an interrupt on the wrong vector. This is mitiated by a carefully orchestrated step by step update and the observation of an eventually pending interrupt on the CPU which issues the update. The algorithm follows the well established method of the X86 MSI driver. - A new driver for the RISC-V Sophgo SG2042 MSI controller - Overhaul of the Renesas RZQ2L driver Simplification of the probe function by using devm_*() mechanisms, which avoid the endless list of error prone gotos in the failure paths. - Expand the Renesas RZV2H driver to support RZ/G3E SoCs - A workaround for Rockchip 3568002 erratum in the GIC-V3 driver to ensure that the addressing is limited to the lower 32-bit of the physical address space. - Add support for the Allwinner AS23 NMI controller - Expand the IMX irqsteer driver to handle up to 960 input interrupts - The usual small updates, cleanups and device tree changes * tag 'irq-drivers-2025-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (40 commits) irqchip/imx-irqsteer: Support up to 960 input interrupts irqchip/sunxi-nmi: Support Allwinner A523 NMI controller dt-bindings: irq: sun7i-nmi: Document the Allwinner A523 NMI controller irqchip/davinci-cp-intc: Remove public header irqchip/renesas-rzv2h: Add RZ/G3E support irqchip/renesas-rzv2h: Update macros ICU_TSSR_TSSEL_{MASK,PREP} irqchip/renesas-rzv2h: Update TSSR_TIEN macro irqchip/renesas-rzv2h: Add field_width to struct rzv2h_hw_info irqchip/renesas-rzv2h: Add max_tssel to struct rzv2h_hw_info irqchip/renesas-rzv2h: Add struct rzv2h_hw_info with t_offs variable irqchip/renesas-rzv2h: Use devm_pm_runtime_enable() irqchip/renesas-rzv2h: Use devm_reset_control_get_exclusive_deasserted() irqchip/renesas-rzv2h: Simplify rzv2h_icu_init() irqchip/renesas-rzv2h: Drop irqchip from struct rzv2h_icu_priv irqchip/renesas-rzv2h: Fix wrong variable usage in rzv2h_tint_set_type() dt-bindings: interrupt-controller: renesas,rzv2h-icu: Document RZ/G3E SoC riscv: sophgo: dts: Add msi controller for SG2042 irqchip: Add the Sophgo SG2042 MSI interrupt controller dt-bindings: interrupt-controller: Add Sophgo SG2042 MSI arm64: dts: rockchip: rk356x: Move PCIe MSI to use GIC ITS instead of MBI ...
2 parents 36f5f02 + 7db5fd6 commit 0f40464

39 files changed

+1047
-497
lines changed

Documentation/arch/arm64/silicon-errata.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@ stable kernels.
284284
+----------------+-----------------+-----------------+-----------------------------+
285285
| Rockchip | RK3588 | #3588001 | ROCKCHIP_ERRATUM_3588001 |
286286
+----------------+-----------------+-----------------+-----------------------------+
287+
| Rockchip | RK3568 | #3568002 | ROCKCHIP_ERRATUM_3568002 |
288+
+----------------+-----------------+-----------------+-----------------------------+
287289
+----------------+-----------------+-----------------+-----------------------------+
288290
| Fujitsu | A64FX | E#010001 | FUJITSU_ERRATUM_010001 |
289291
+----------------+-----------------+-----------------+-----------------------------+

Documentation/devicetree/bindings/interrupt-controller/allwinner,sun7i-a20-sc-nmi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
deprecated: true
2727
- const: allwinner,sun7i-a20-sc-nmi
2828
- const: allwinner,sun9i-a80-nmi
29+
- const: allwinner,sun55i-a523-nmi
2930
- items:
3031
- enum:
3132
- allwinner,sun8i-v3s-nmi

Documentation/devicetree/bindings/interrupt-controller/renesas,rzv2h-icu.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
$id: http://devicetree.org/schemas/interrupt-controller/renesas,rzv2h-icu.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: Renesas RZ/V2H(P) Interrupt Control Unit
7+
title: Renesas RZ/{G3E,V2H(P)} Interrupt Control Unit
88

99
maintainers:
1010
- Fabrizio Castro <[email protected]>
@@ -20,7 +20,9 @@ description:
2020

2121
properties:
2222
compatible:
23-
const: renesas,r9a09g057-icu # RZ/V2H(P)
23+
enum:
24+
- renesas,r9a09g047-icu # RZ/G3E
25+
- renesas,r9a09g057-icu # RZ/V2H(P)
2426

2527
'#interrupt-cells':
2628
description: The first cell is the SPI number of the NMI or the

Documentation/devicetree/bindings/interrupt-controller/riscv,aplic.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ properties:
9191
Firmware must configure interrupt delegation registers based on
9292
interrupt delegation list.
9393

94+
riscv,hart-indexes:
95+
$ref: /schemas/types.yaml#/definitions/uint32-array
96+
minItems: 1
97+
maxItems: 16384
98+
description:
99+
A list of hart indexes that APLIC should use to address each hart
100+
that is mentioned in the "interrupts-extended"
101+
94102
dependencies:
95103
riscv,delegation: [ "riscv,children" ]
96104

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/interrupt-controller/sophgo,sg2042-msi.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Sophgo SG2042 MSI Controller
8+
9+
maintainers:
10+
- Chen Wang <[email protected]>
11+
12+
description:
13+
This interrupt controller is in Sophgo SG2042 for transforming interrupts from
14+
PCIe MSI to PLIC interrupts.
15+
16+
allOf:
17+
- $ref: /schemas/interrupt-controller/msi-controller.yaml#
18+
19+
properties:
20+
compatible:
21+
const: sophgo,sg2042-msi
22+
23+
reg:
24+
items:
25+
- description: clear register
26+
- description: msi doorbell address
27+
28+
reg-names:
29+
items:
30+
- const: clr
31+
- const: doorbell
32+
33+
msi-controller: true
34+
35+
msi-ranges:
36+
maxItems: 1
37+
38+
"#msi-cells":
39+
const: 0
40+
41+
required:
42+
- compatible
43+
- reg
44+
- reg-names
45+
- msi-controller
46+
- msi-ranges
47+
- "#msi-cells"
48+
49+
unevaluatedProperties: false
50+
51+
examples:
52+
- |
53+
#include <dt-bindings/interrupt-controller/irq.h>
54+
msi-controller@30000000 {
55+
compatible = "sophgo,sg2042-msi";
56+
reg = <0x30000000 0x4>, <0x30000008 0x4>;
57+
reg-names = "clr", "doorbell";
58+
msi-controller;
59+
#msi-cells = <0>;
60+
msi-ranges = <&plic 64 IRQ_TYPE_LEVEL_HIGH 32>;
61+
};

arch/arm/mach-davinci/da830.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <linux/gpio.h>
1212
#include <linux/init.h>
1313
#include <linux/io.h>
14-
#include <linux/irqchip/irq-davinci-cp-intc.h>
1514

1615
#include <clocksource/timer-davinci.h>
1716

arch/arm64/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,6 +1302,15 @@ config NVIDIA_CARMEL_CNP_ERRATUM
13021302

13031303
If unsure, say Y.
13041304

1305+
config ROCKCHIP_ERRATUM_3568002
1306+
bool "Rockchip 3568002: GIC600 can not access physical addresses higher than 4GB"
1307+
default y
1308+
help
1309+
The Rockchip RK3566 and RK3568 GIC600 SoC integrations have AXI
1310+
addressing limited to the first 32bit of physical address space.
1311+
1312+
If unsure, say Y.
1313+
13051314
config ROCKCHIP_ERRATUM_3588001
13061315
bool "Rockchip 3588001: GIC600 can not support shareability attributes"
13071316
default y

arch/arm64/boot/dts/rockchip/rk356x-base.dtsi

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,18 @@
284284
mbi-alias = <0x0 0xfd410000>;
285285
mbi-ranges = <296 24>;
286286
msi-controller;
287+
ranges;
288+
#address-cells = <2>;
289+
#size-cells = <2>;
290+
dma-noncoherent;
291+
292+
its: msi-controller@fd440000 {
293+
compatible = "arm,gic-v3-its";
294+
reg = <0x0 0xfd440000 0 0x20000>;
295+
dma-noncoherent;
296+
msi-controller;
297+
#msi-cells = <1>;
298+
};
287299
};
288300

289301
usb_host0_ehci: usb@fd800000 {
@@ -957,7 +969,7 @@
957969
num-ib-windows = <6>;
958970
num-ob-windows = <2>;
959971
max-link-speed = <2>;
960-
msi-map = <0x0 &gic 0x0 0x1000>;
972+
msi-map = <0x0 &its 0x0 0x1000>;
961973
num-lanes = <1>;
962974
phys = <&combphy2 PHY_TYPE_PCIE>;
963975
phy-names = "pcie-phy";

arch/riscv/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ config RISCV
111111
select GENERIC_IRQ_SHOW
112112
select GENERIC_IRQ_SHOW_LEVEL
113113
select GENERIC_LIB_DEVMEM_IS_ALLOWED
114+
select GENERIC_PENDING_IRQ if SMP
114115
select GENERIC_PCI_IOMAP
115116
select GENERIC_PTDUMP if MMU
116117
select GENERIC_SCHED_CLOCK

arch/riscv/boot/dts/sophgo/sg2042.dtsi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,16 @@
173173
#clock-cells = <1>;
174174
};
175175

176+
msi: msi-controller@7030010304 {
177+
compatible = "sophgo,sg2042-msi";
178+
reg = <0x70 0x30010304 0x0 0x4>,
179+
<0x70 0x30010300 0x0 0x4>;
180+
reg-names = "clr", "doorbell";
181+
msi-controller;
182+
#msi-cells = <0>;
183+
msi-ranges = <&intc 64 IRQ_TYPE_LEVEL_HIGH 32>;
184+
};
185+
176186
rpgate: clock-controller@7030010368 {
177187
compatible = "sophgo,sg2042-rpgate";
178188
reg = <0x70 0x30010368 0x0 0x98>;

0 commit comments

Comments
 (0)