Skip to content

Commit c457cc8

Browse files
committed
Merge tag 'irq-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq updates from Thomas Gleixner: "Updates for the interrupt subsystem: Core: - Allow trimming of interrupt hierarchy to support odd hardware setups where only a subset of the interrupts requires the full hierarchy. - Allow the retrigger mechanism to follow a hierarchy to simplify driver code. - Provide a mechanism to force enable wakeup interrrupts on suspend. - More infrastructure to handle IPIs in the core code Architectures: - Convert ARM/ARM64 IPI handling to utilize the interrupt core code. Drivers: - The usual pile of new interrupt chips (MStar, Actions Owl, TI PRUSS, Designware ICTL) - ARM(64) IPI related conversions - Wakeup support for Qualcom PDC - Prevent hierarchy corruption in the NVIDIA Tegra driver - The usual small fixes, improvements and cleanups all over the place" * tag 'irq-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (59 commits) dt-bindings: interrupt-controller: Add MStar interrupt controller irqchip/irq-mst: Add MStar interrupt controller support soc/tegra: pmc: Don't create fake interrupt hierarchy levels soc/tegra: pmc: Allow optional irq parent callbacks gpio: tegra186: Allow optional irq parent callbacks genirq/irqdomain: Allow partial trimming of irq_data hierarchy irqchip/qcom-pdc: Reset PDC interrupts during init irqchip/qcom-pdc: Set IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag pinctrl: qcom: Set IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag genirq/PM: Introduce IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag pinctrl: qcom: Use return value from irq_set_wake() call pinctrl: qcom: Set IRQCHIP_SET_TYPE_MASKED and IRQCHIP_MASK_ON_SUSPEND flags ARM: Handle no IPI being registered in show_ipi_list() MAINTAINERS: Add entries for Actions Semi Owl SIRQ controller irqchip: Add Actions Semi Owl SIRQ controller dt-bindings: interrupt-controller: Add Actions SIRQ controller binding dt-bindings: dw-apb-ictl: Update binding to describe use as primary interrupt controller irqchip/dw-apb-ictl: Add primary interrupt controller support irqchip/dw-apb-ictl: Refactor priot to introducing hierarchical irq domains genirq: Add stub for set_handle_irq() when !GENERIC_IRQ_MULTI_HANDLER ...
2 parents f5f5933 + 863bae1 commit c457cc8

51 files changed

Lines changed: 2762 additions & 613 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/interrupt-controller/actions,owl-sirq.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Actions Semi Owl SoCs SIRQ interrupt controller
8+
9+
maintainers:
10+
- Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
11+
- Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
12+
13+
description: |
14+
This interrupt controller is found in the Actions Semi Owl SoCs (S500, S700
15+
and S900) and provides support for handling up to 3 external interrupt lines.
16+
17+
properties:
18+
compatible:
19+
enum:
20+
- actions,s500-sirq
21+
- actions,s700-sirq
22+
- actions,s900-sirq
23+
24+
reg:
25+
maxItems: 1
26+
27+
interrupt-controller: true
28+
29+
'#interrupt-cells':
30+
const: 2
31+
description:
32+
The first cell is the input IRQ number, between 0 and 2, while the second
33+
cell is the trigger type as defined in interrupt.txt in this directory.
34+
35+
'interrupts':
36+
description: |
37+
Contains the GIC SPI IRQs mapped to the external interrupt lines.
38+
They shall be specified sequentially from output 0 to 2.
39+
minItems: 3
40+
maxItems: 3
41+
42+
required:
43+
- compatible
44+
- reg
45+
- interrupt-controller
46+
- '#interrupt-cells'
47+
- 'interrupts'
48+
49+
additionalProperties: false
50+
51+
examples:
52+
- |
53+
#include <dt-bindings/interrupt-controller/arm-gic.h>
54+
55+
sirq: interrupt-controller@b01b0200 {
56+
compatible = "actions,s500-sirq";
57+
reg = <0xb01b0200 0x4>;
58+
interrupt-controller;
59+
#interrupt-cells = <2>;
60+
interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>, /* SIRQ0 */
61+
<GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>, /* SIRQ1 */
62+
<GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; /* SIRQ2 */
63+
};
64+
65+
...
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/interrupt-controller/mstar,mst-intc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MStar Interrupt Controller
8+
9+
maintainers:
10+
- Mark-PK Tsai <mark-pk.tsai@mediatek.com>
11+
12+
description: |+
13+
MStar, SigmaStar and Mediatek TV SoCs contain multiple legacy
14+
interrupt controllers that routes interrupts to the GIC.
15+
16+
The HW block exposes a number of interrupt controllers, each
17+
can support up to 64 interrupts.
18+
19+
properties:
20+
compatible:
21+
const: mstar,mst-intc
22+
23+
interrupt-controller: true
24+
25+
"#interrupt-cells":
26+
const: 3
27+
description: |
28+
Use the same format as specified by GIC in arm,gic.yaml.
29+
30+
reg:
31+
maxItems: 1
32+
33+
mstar,irqs-map-range:
34+
description: |
35+
The range <start, end> of parent interrupt controller's interrupt
36+
lines that are hardwired to mstar interrupt controller.
37+
$ref: /schemas/types.yaml#/definitions/uint32-matrix
38+
items:
39+
minItems: 2
40+
maxItems: 2
41+
42+
mstar,intc-no-eoi:
43+
description:
44+
Mark this controller has no End Of Interrupt(EOI) implementation.
45+
type: boolean
46+
47+
required:
48+
- compatible
49+
- reg
50+
- mstar,irqs-map-range
51+
52+
additionalProperties: false
53+
54+
examples:
55+
- |
56+
mst_intc0: interrupt-controller@1f2032d0 {
57+
compatible = "mstar,mst-intc";
58+
interrupt-controller;
59+
#interrupt-cells = <3>;
60+
interrupt-parent = <&gic>;
61+
reg = <0x1f2032d0 0x30>;
62+
mstar,irqs-map-range = <0 63>;
63+
};
64+
...

Documentation/devicetree/bindings/interrupt-controller/snps,dw-apb-ictl.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ Synopsys DesignWare APB interrupt controller (dw_apb_ictl)
22

33
Synopsys DesignWare provides interrupt controller IP for APB known as
44
dw_apb_ictl. The IP is used as secondary interrupt controller in some SoCs with
5-
APB bus, e.g. Marvell Armada 1500.
5+
APB bus, e.g. Marvell Armada 1500. It can also be used as primary interrupt
6+
controller in some SoCs, e.g. Hisilicon SD5203.
67

78
Required properties:
89
- compatible: shall be "snps,dw-apb-ictl"
910
- reg: physical base address of the controller and length of memory mapped
1011
region starting with ENABLE_LOW register
1112
- interrupt-controller: identifies the node as an interrupt controller
1213
- #interrupt-cells: number of cells to encode an interrupt-specifier, shall be 1
14+
15+
Additional required property when it's used as secondary interrupt controller:
1316
- interrupts: interrupt reference to primary interrupt controller
1417

1518
The interrupt sources map to the corresponding bits in the interrupt
@@ -21,6 +24,7 @@ registers, i.e.
2124
- (optional) fast interrupts start at 64.
2225

2326
Example:
27+
/* dw_apb_ictl is used as secondary interrupt controller */
2428
aic: interrupt-controller@3000 {
2529
compatible = "snps,dw-apb-ictl";
2630
reg = <0x3000 0xc00>;
@@ -29,3 +33,11 @@ Example:
2933
interrupt-parent = <&gic>;
3034
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
3135
};
36+
37+
/* dw_apb_ictl is used as primary interrupt controller */
38+
vic: interrupt-controller@10130000 {
39+
compatible = "snps,dw-apb-ictl";
40+
reg = <0x10130000 0x1000>;
41+
interrupt-controller;
42+
#interrupt-cells = <1>;
43+
};
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/interrupt-controller/ti,pruss-intc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: TI PRU-ICSS Local Interrupt Controller
8+
9+
maintainers:
10+
- Suman Anna <s-anna@ti.com>
11+
12+
description: |
13+
Each PRU-ICSS has a single interrupt controller instance that is common
14+
to all the PRU cores. Most interrupt controllers can route 64 input events
15+
which are then mapped to 10 possible output interrupts through two levels
16+
of mapping. The input events can be triggered by either the PRUs and/or
17+
various other PRUSS internal and external peripherals. The first 2 output
18+
interrupts (0, 1) are fed exclusively to the internal PRU cores, with the
19+
remaining 8 (2 through 9) connected to external interrupt controllers
20+
including the MPU and/or other PRUSS instances, DSPs or devices.
21+
22+
The property "ti,irqs-reserved" is used for denoting the connection
23+
differences on the output interrupts 2 through 9. If this property is not
24+
defined, it implies that all the PRUSS INTC output interrupts 2 through 9
25+
(host_intr0 through host_intr7) are connected exclusively to the Arm interrupt
26+
controller.
27+
28+
The K3 family of SoCs can handle 160 input events that can be mapped to 20
29+
different possible output interrupts. The additional output interrupts (10
30+
through 19) are connected to new sub-modules within the ICSSG instances.
31+
32+
This interrupt-controller node should be defined as a child node of the
33+
corresponding PRUSS node. The node should be named "interrupt-controller".
34+
35+
properties:
36+
compatible:
37+
enum:
38+
- ti,pruss-intc
39+
- ti,icssg-intc
40+
description: |
41+
Use "ti,pruss-intc" for OMAP-L13x/AM18x/DA850 SoCs,
42+
AM335x family of SoCs,
43+
AM437x family of SoCs,
44+
AM57xx family of SoCs
45+
66AK2G family of SoCs
46+
Use "ti,icssg-intc" for K3 AM65x & J721E family of SoCs
47+
48+
reg:
49+
maxItems: 1
50+
51+
interrupts:
52+
minItems: 1
53+
maxItems: 8
54+
description: |
55+
All the interrupts generated towards the main host processor in the SoC.
56+
A shared interrupt can be skipped if the desired destination and usage is
57+
by a different processor/device.
58+
59+
interrupt-names:
60+
minItems: 1
61+
maxItems: 8
62+
items:
63+
pattern: host_intr[0-7]
64+
description: |
65+
Should use one of the above names for each valid host event interrupt
66+
connected to Arm interrupt controller, the name should match the
67+
corresponding host event interrupt number.
68+
69+
interrupt-controller: true
70+
71+
"#interrupt-cells":
72+
const: 3
73+
description: |
74+
Client users shall use the PRU System event number (the interrupt source
75+
that the client is interested in) [cell 1], PRU channel [cell 2] and PRU
76+
host_event (target) [cell 3] as the value of the interrupts property in
77+
their node. The system events can be mapped to some output host
78+
interrupts through 2 levels of many-to-one mapping i.e. events to channel
79+
mapping and channels to host interrupts so through this property entire
80+
mapping is provided.
81+
82+
ti,irqs-reserved:
83+
$ref: /schemas/types.yaml#definitions/uint8
84+
description: |
85+
Bitmask of host interrupts between 0 and 7 (corresponding to PRUSS INTC
86+
output interrupts 2 through 9) that are not connected to the Arm interrupt
87+
controller or are shared and used by other devices or processors in the
88+
SoC. Define this property when any of 8 interrupts should not be handled
89+
by Arm interrupt controller.
90+
Eg: - AM437x and 66AK2G SoCs do not have "host_intr5" interrupt
91+
connected to MPU
92+
- AM65x and J721E SoCs have "host_intr5", "host_intr6" and
93+
"host_intr7" interrupts connected to MPU, and other ICSSG
94+
instances.
95+
96+
required:
97+
- compatible
98+
- reg
99+
- interrupts
100+
- interrupt-names
101+
- interrupt-controller
102+
- "#interrupt-cells"
103+
104+
additionalProperties: false
105+
106+
examples:
107+
- |
108+
/* AM33xx PRU-ICSS */
109+
pruss: pruss@0 {
110+
compatible = "ti,am3356-pruss";
111+
reg = <0x0 0x80000>;
112+
#address-cells = <1>;
113+
#size-cells = <1>;
114+
ranges;
115+
116+
pruss_intc: interrupt-controller@20000 {
117+
compatible = "ti,pruss-intc";
118+
reg = <0x20000 0x2000>;
119+
interrupts = <20 21 22 23 24 25 26 27>;
120+
interrupt-names = "host_intr0", "host_intr1",
121+
"host_intr2", "host_intr3",
122+
"host_intr4", "host_intr5",
123+
"host_intr6", "host_intr7";
124+
interrupt-controller;
125+
#interrupt-cells = <3>;
126+
};
127+
};
128+
129+
- |
130+
131+
/* AM4376 PRU-ICSS */
132+
#include <dt-bindings/interrupt-controller/arm-gic.h>
133+
pruss@0 {
134+
compatible = "ti,am4376-pruss";
135+
reg = <0x0 0x40000>;
136+
#address-cells = <1>;
137+
#size-cells = <1>;
138+
ranges;
139+
140+
interrupt-controller@20000 {
141+
compatible = "ti,pruss-intc";
142+
reg = <0x20000 0x2000>;
143+
interrupt-controller;
144+
#interrupt-cells = <3>;
145+
interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
146+
<GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
147+
<GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
148+
<GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
149+
<GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
150+
<GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
151+
<GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
152+
interrupt-names = "host_intr0", "host_intr1",
153+
"host_intr2", "host_intr3",
154+
"host_intr4",
155+
"host_intr6", "host_intr7";
156+
ti,irqs-reserved = /bits/ 8 <0x20>; /* BIT(5) */
157+
};
158+
};

MAINTAINERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,6 +1537,7 @@ F: Documentation/devicetree/bindings/arm/actions.yaml
15371537
F: Documentation/devicetree/bindings/clock/actions,owl-cmu.txt
15381538
F: Documentation/devicetree/bindings/dma/owl-dma.txt
15391539
F: Documentation/devicetree/bindings/i2c/i2c-owl.txt
1540+
F: Documentation/devicetree/bindings/interrupt-controller/actions,owl-sirq.yaml
15401541
F: Documentation/devicetree/bindings/mmc/owl-mmc.yaml
15411542
F: Documentation/devicetree/bindings/pinctrl/actions,s900-pinctrl.txt
15421543
F: Documentation/devicetree/bindings/power/actions,owl-sps.txt
@@ -1548,6 +1549,7 @@ F: drivers/clk/actions/
15481549
F: drivers/clocksource/timer-owl*
15491550
F: drivers/dma/owl-dma.c
15501551
F: drivers/i2c/busses/i2c-owl.c
1552+
F: drivers/irqchip/irq-owl-sirq.c
15511553
F: drivers/mmc/host/owl-mmc.c
15521554
F: drivers/pinctrl/actions/*
15531555
F: drivers/soc/actions/
@@ -11788,6 +11790,13 @@ Q: http://patchwork.linuxtv.org/project/linux-media/list/
1178811790
T: git git://linuxtv.org/anttip/media_tree.git
1178911791
F: drivers/media/usb/msi2500/
1179011792

11793+
MSTAR INTERRUPT CONTROLLER DRIVER
11794+
M: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
11795+
M: Daniel Palmer <daniel@thingy.jp>
11796+
S: Maintained
11797+
F: Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml
11798+
F: drivers/irqchip/irq-mst-intc.c
11799+
1179111800
MSYSTEMS DISKONCHIP G3 MTD DRIVER
1179211801
M: Robert Jarzmik <robert.jarzmik@free.fr>
1179311802
L: linux-mtd@lists.infradead.org

arch/arm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ config ARM
4949
select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY
5050
select GENERIC_ATOMIC64 if CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI
5151
select GENERIC_CLOCKEVENTS_BROADCAST if SMP
52+
select GENERIC_IRQ_IPI if SMP
5253
select GENERIC_CPU_AUTOPROBE
5354
select GENERIC_EARLY_IOREMAP
5455
select GENERIC_IDLE_POLL_SETUP

arch/arm/include/asm/hardirq.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,12 @@
66
#include <linux/threads.h>
77
#include <asm/irq.h>
88

9-
/* number of IPIS _not_ including IPI_CPU_BACKTRACE */
10-
#define NR_IPI 7
11-
129
typedef struct {
1310
unsigned int __softirq_pending;
14-
#ifdef CONFIG_SMP
15-
unsigned int ipi_irqs[NR_IPI];
16-
#endif
1711
} ____cacheline_aligned irq_cpustat_t;
1812

1913
#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
2014

21-
#define __inc_irq_stat(cpu, member) __IRQ_STAT(cpu, member)++
22-
#define __get_irq_stat(cpu, member) __IRQ_STAT(cpu, member)
23-
24-
#ifdef CONFIG_SMP
25-
u64 smp_irq_stat_cpu(unsigned int cpu);
26-
#else
27-
#define smp_irq_stat_cpu(cpu) 0
28-
#endif
29-
30-
#define arch_irq_stat_cpu smp_irq_stat_cpu
31-
3215
#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
3316

3417
#endif /* __ASM_HARDIRQ_H */

0 commit comments

Comments
 (0)