Skip to content

Commit c6dca71

Browse files
author
Marc Zyngier
committed
Merge branch irq/remove-handle-domain-irq-20211026 into irq/irqchip-next
* irq/remove-handle-domain-irq-20211026: : Large rework of the architecture entry code from Mark Rutland. : From the cover letter: : : <quote> : The handle_domain_{irq,nmi}() functions were oringally intended as a : convenience, but recent rework to entry code across the kernel tree has : demonstrated that they cause more pain than they're worth and prevent : architectures from being able to write robust entry code. : : This series reworks the irq code to remove them, handling the necessary : entry work consistently in entry code (be it architectural or generic). : </quote> MIPS: irq: Avoid an unused-variable error 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() irq: mips: stop (ab)using handle_domain_irq() irq: mips: simplify bcm6345_l1_irq_handle() irq: mips: avoid nested irq_enter() Signed-off-by: Marc Zyngier <[email protected]>
2 parents e6a767a + 34fca89 commit c6dca71

Some content is hidden

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

67 files changed

+192
-221
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.

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-imx/avic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static void __exception_irq_entry avic_handle_irq(struct pt_regs *regs)
154154
if (nivector == 0xffff)
155155
break;
156156

157-
handle_domain_irq(domain, nivector, regs);
157+
generic_handle_domain_irq(domain, nivector);
158158
} while (1);
159159
}
160160

arch/arm/mach-imx/tzic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static void __exception_irq_entry tzic_handle_irq(struct pt_regs *regs)
134134
while (stat) {
135135
handled = 1;
136136
irqofs = fls(stat) - 1;
137-
handle_domain_irq(domain, irqofs + i * 32, regs);
137+
generic_handle_domain_irq(domain, irqofs + i * 32);
138138
stat &= ~(1 << irqofs);
139139
}
140140
}

arch/arm/mach-omap1/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ asmlinkage void __exception_irq_entry omap1_handle_irq(struct pt_regs *regs)
165165
}
166166
irq:
167167
if (irqnr)
168-
handle_domain_irq(domain, irqnr, regs);
168+
generic_handle_domain_irq(domain, irqnr);
169169
else
170170
break;
171171
} while (irqnr);

arch/arm/mach-s3c/irq-s3c24xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static inline int s3c24xx_handle_intc(struct s3c_irq_intc *intc,
354354
if (!(pnd & (1 << offset)))
355355
offset = __ffs(pnd);
356356

357-
handle_domain_irq(intc->domain, intc_offset + offset, regs);
357+
generic_handle_domain_irq(intc->domain, intc_offset + offset);
358358
return true;
359359
}
360360

0 commit comments

Comments
 (0)