Skip to content

Commit 5a47ebe

Browse files
committed
Merge tag 'irq-core-2021-10-31' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq updates from Thomas Gleixner: "Updates for the interrupt subsystem: Core changes: - Prevent a potential deadlock when initial priority is assigned to a newly created interrupt thread. A recent change to plug a race between cpuset and __sched_setscheduler() introduced a new lock dependency which is now triggered. Break the lock dependency chain by moving the priority assignment to the thread function. - A couple of small updates to make the irq core RT safe. - Confine the irq_cpu_online/offline() API to the only left unfixable user Cavium Octeon so that it does not grow new usage. - A small documentation update Driver changes: - A large cross architecture rework to move irq_enter/exit() into the architecture code to make addressing the NOHZ_FULL/RCU issues simpler. - The obligatory new irq chip driver for Microchip EIC - Modularize a few irq chip drivers - Expand usage of devm_*() helpers throughout the driver code - The usual small fixes and improvements all over the place" * tag 'irq-core-2021-10-31' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (53 commits) h8300: Fix linux/irqchip.h include mess dt-bindings: irqchip: renesas-irqc: Document r8a774e1 bindings MIPS: irq: Avoid an unused-variable error genirq: Hide irq_cpu_{on,off}line() behind a deprecated option irqchip/mips-gic: Get rid of the reliance on irq_cpu_online() MIPS: loongson64: Drop call to irq_cpu_offline() irq: remove handle_domain_{irq,nmi}() irq: remove CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY irq: riscv: perform irqentry in entry code irq: openrisc: perform irqentry in entry code irq: csky: perform irqentry in entry code irq: arm64: perform irqentry in entry code irq: arm: perform irqentry in entry code irq: add a (temporary) CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY irq: nds32: avoid CONFIG_HANDLE_DOMAIN_IRQ irq: arc: avoid CONFIG_HANDLE_DOMAIN_IRQ irq: add generic_handle_arch_irq() irq: unexport handle_irq_desc() irq: simplify handle_domain_{irq,nmi}() irq: mips: simplify do_domain_IRQ() ...
2 parents 037c50b + 2258a6f commit 5a47ebe

Some content is hidden

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

96 files changed

+700
-329
lines changed

Documentation/core-api/irq/irq-domain.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ variety of methods:
6767
deprecated
6868
- generic_handle_domain_irq() handles an interrupt described by a
6969
domain and a hwirq number
70-
- handle_domain_irq() does the same thing for root interrupt
71-
controllers and deals with the set_irq_reg()/irq_enter() sequences
72-
that most architecture requires
7370

7471
Note that irq domain lookups must happen in contexts that are
7572
compatible with a RCU read-side critical section.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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/microchip,eic.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Microchip External Interrupt Controller
8+
9+
maintainers:
10+
- Claudiu Beznea <[email protected]>
11+
12+
description:
13+
This interrupt controller is found in Microchip SoCs (SAMA7G5) and provides
14+
support for handling up to 2 external interrupt lines.
15+
16+
properties:
17+
compatible:
18+
enum:
19+
- microchip,sama7g5-eic
20+
21+
reg:
22+
maxItems: 1
23+
24+
interrupt-controller: true
25+
26+
'#interrupt-cells':
27+
const: 2
28+
description:
29+
The first cell is the input IRQ number (between 0 and 1), the second cell
30+
is the trigger type as defined in interrupt.txt present in this directory.
31+
32+
interrupts:
33+
description: |
34+
Contains the GIC SPI IRQs mapped to the external interrupt lines. They
35+
should be specified sequentially from output 0 to output 1.
36+
minItems: 2
37+
maxItems: 2
38+
39+
clocks:
40+
maxItems: 1
41+
42+
clock-names:
43+
const: pclk
44+
45+
required:
46+
- compatible
47+
- reg
48+
- interrupt-controller
49+
- '#interrupt-cells'
50+
- interrupts
51+
- clocks
52+
- clock-names
53+
54+
additionalProperties: false
55+
56+
examples:
57+
- |
58+
#include <dt-bindings/clock/at91.h>
59+
#include <dt-bindings/interrupt-controller/arm-gic.h>
60+
61+
eic: interrupt-controller@e1628000 {
62+
compatible = "microchip,sama7g5-eic";
63+
reg = <0xe1628000 0x100>;
64+
interrupt-parent = <&gic>;
65+
interrupt-controller;
66+
#interrupt-cells = <2>;
67+
interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
68+
<GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
69+
clocks = <&pmc PMC_TYPE_PERIPHERAL 37>;
70+
clock-names = "pclk";
71+
};
72+
73+
...

Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ properties:
2727
- renesas,intc-ex-r8a774a1 # RZ/G2M
2828
- renesas,intc-ex-r8a774b1 # RZ/G2N
2929
- renesas,intc-ex-r8a774c0 # RZ/G2E
30+
- renesas,intc-ex-r8a774e1 # RZ/G2H
3031
- renesas,intc-ex-r8a7795 # R-Car H3
3132
- renesas,intc-ex-r8a7796 # R-Car M3-W
3233
- renesas,intc-ex-r8a77961 # R-Car M3-W+

MAINTAINERS

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1552,7 +1552,7 @@ ARM PRIMECELL VIC PL190/PL192 DRIVER
15521552
M: Linus Walleij <[email protected]>
15531553
L: [email protected] (moderated for non-subscribers)
15541554
S: Maintained
1555-
F: Documentation/devicetree/bindings/interrupt-controller/arm,vic.txt
1555+
F: Documentation/devicetree/bindings/interrupt-controller/arm,vic.yaml
15561556
F: drivers/irqchip/irq-vic.c
15571557

15581558
ARM SMC WATCHDOG DRIVER
@@ -12270,6 +12270,12 @@ L: [email protected]
1227012270
S: Maintained
1227112271
F: drivers/crypto/atmel-ecc.*
1227212272

12273+
MICROCHIP EIC DRIVER
12274+
M: Claudiu Beznea <[email protected]>
12275+
L: [email protected] (moderated for non-subscribers)
12276+
S: Supported
12277+
F: drivers/irqchip/irq-mchp-eic.c
12278+
1227312279
MICROCHIP I2C DRIVER
1227412280
M: Codrin Ciubotariu <[email protected]>
1227512281

arch/arc/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ config ARC
4040
select HAVE_KRETPROBES
4141
select HAVE_MOD_ARCH_SPECIFIC
4242
select HAVE_PERF_EVENTS
43-
select HANDLE_DOMAIN_IRQ
4443
select IRQ_DOMAIN
4544
select MODULES_USE_ELF_RELA
4645
select OF

arch/arc/kernel/irq.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include <linux/interrupt.h>
77
#include <linux/irqchip.h>
88
#include <asm/mach_desc.h>
9+
10+
#include <asm/irq_regs.h>
911
#include <asm/smp.h>
1012

1113
/*
@@ -39,5 +41,11 @@ void __init init_IRQ(void)
3941
*/
4042
void arch_do_IRQ(unsigned int hwirq, struct pt_regs *regs)
4143
{
42-
handle_domain_irq(NULL, hwirq, regs);
44+
struct pt_regs *old_regs;
45+
46+
irq_enter();
47+
old_regs = set_irq_regs(regs);
48+
generic_handle_domain_irq(NULL, hwirq);
49+
set_irq_regs(old_regs);
50+
irq_exit();
4351
}

arch/arm/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ config ARM
6464
select GENERIC_PCI_IOMAP
6565
select GENERIC_SCHED_CLOCK
6666
select GENERIC_SMP_IDLE_THREAD
67-
select HANDLE_DOMAIN_IRQ
6867
select HARDIRQS_SW_RESEND
6968
select HAVE_ARCH_AUDITSYSCALL if AEABI && !OABI_COMPAT
7069
select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6

arch/arm/kernel/entry-armv.S

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,11 @@
3838
*/
3939
.macro irq_handler
4040
#ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER
41-
ldr r1, =handle_arch_irq
4241
mov r0, sp
43-
badr lr, 9997f
44-
ldr pc, [r1]
42+
bl generic_handle_arch_irq
4543
#else
4644
arch_irq_handler_default
4745
#endif
48-
9997:
4946
.endm
5047

5148
.macro pabt_helper

arch/arm/kernel/irq.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,8 @@ int arch_show_interrupts(struct seq_file *p, int prec)
6363
*/
6464
void handle_IRQ(unsigned int irq, struct pt_regs *regs)
6565
{
66-
struct pt_regs *old_regs = set_irq_regs(regs);
6766
struct irq_desc *desc;
6867

69-
irq_enter();
70-
7168
/*
7269
* Some hardware gives randomly wrong interrupts. Rather
7370
* than crashing, do something sensible.
@@ -81,9 +78,6 @@ void handle_IRQ(unsigned int irq, struct pt_regs *regs)
8178
handle_irq_desc(desc);
8279
else
8380
ack_bad_irq(irq);
84-
85-
irq_exit();
86-
set_irq_regs(old_regs);
8781
}
8882

8983
/*
@@ -92,7 +86,15 @@ void handle_IRQ(unsigned int irq, struct pt_regs *regs)
9286
asmlinkage void __exception_irq_entry
9387
asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
9488
{
89+
struct pt_regs *old_regs;
90+
91+
irq_enter();
92+
old_regs = set_irq_regs(regs);
93+
9594
handle_IRQ(irq, regs);
95+
96+
set_irq_regs(old_regs);
97+
irq_exit();
9698
}
9799

98100
void __init init_IRQ(void)

arch/arm/mach-bcm/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ config ARCH_BCM2835
161161
select ARM_TIMER_SP804
162162
select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7
163163
select BCM2835_TIMER
164-
select BRCMSTB_L2_IRQ
165164
select PINCTRL
166165
select PINCTRL_BCM2835
167166
select MFD_CORE
@@ -209,9 +208,6 @@ config ARCH_BRCMSTB
209208
select ARM_GIC
210209
select ARM_ERRATA_798181 if SMP
211210
select HAVE_ARM_ARCH_TIMER
212-
select BCM7038_L1_IRQ
213-
select BRCMSTB_L2_IRQ
214-
select BCM7120_L2_IRQ
215211
select ZONE_DMA if ARM_LPAE
216212
select SOC_BRCMSTB
217213
select SOC_BUS

0 commit comments

Comments
 (0)