[PATCH] ARM: irq: remove handle_IRQ() for good
From: Arnd Bergmann
Date: Tue Jan 17 2023 - 12:55:35 EST
From: Arnd Bergmann <arnd@xxxxxxxx>
The only difference between generic_handle_irq() and the ARM
handle_IRQ() version is now the range check, and in the remaining
drivers this does not appear to be needed any more.
Remove this old interface and use the generic version in its place.
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
arch/arm/include/asm/irq.h | 4 ----
arch/arm/kernel/irq.c | 25 -------------------------
arch/arm/mach-dove/irq.c | 6 ++----
arch/arm/mach-mv78xx0/irq.c | 9 +++------
arch/arm/mach-orion5x/irq.c | 3 +--
arch/arm/mach-pxa/irq.c | 4 ++--
6 files changed, 8 insertions(+), 43 deletions(-)
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h
index a7c2337b0c7d..f62fa9f36192 100644
--- a/arch/arm/include/asm/irq.h
+++ b/arch/arm/include/asm/irq.h
@@ -23,10 +23,6 @@
#endif
#ifndef __ASSEMBLY__
-struct irqaction;
-struct pt_regs;
-
-void handle_IRQ(unsigned int, struct pt_regs *);
void init_IRQ(void);
#ifdef CONFIG_SMP
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index fe28fc1f759d..e0983269729f 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -96,31 +96,6 @@ int arch_show_interrupts(struct seq_file *p, int prec)
return 0;
}
-/*
- * handle_IRQ handles all hardware IRQ's. Decoded IRQs should
- * not come via this function. Instead, they should provide their
- * own 'handler'. Used by platform code implementing C-based 1st
- * level decoding.
- */
-void handle_IRQ(unsigned int irq, struct pt_regs *regs)
-{
- struct irq_desc *desc;
-
- /*
- * Some hardware gives randomly wrong interrupts. Rather
- * than crashing, do something sensible.
- */
- if (unlikely(!irq || irq >= nr_irqs))
- desc = NULL;
- else
- desc = irq_to_desc(irq);
-
- if (likely(desc))
- handle_irq_desc(desc);
- else
- ack_bad_irq(irq);
-}
-
void __init init_IRQ(void)
{
int ret;
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c
index 027a8f87bc2e..500f097e09b3 100644
--- a/arch/arm/mach-dove/irq.c
+++ b/arch/arm/mach-dove/irq.c
@@ -47,15 +47,13 @@ __exception_irq_entry dove_legacy_handle_irq(struct pt_regs *regs)
stat = readl_relaxed(dove_irq_base + IRQ_CAUSE_LOW_OFF);
stat &= readl_relaxed(dove_irq_base + IRQ_MASK_LOW_OFF);
if (stat) {
- unsigned int hwirq = 1 + __fls(stat);
- handle_IRQ(hwirq, regs);
+ generic_handle_irq(1 + __fls(stat));
return;
}
stat = readl_relaxed(dove_irq_base + IRQ_CAUSE_HIGH_OFF);
stat &= readl_relaxed(dove_irq_base + IRQ_MASK_HIGH_OFF);
if (stat) {
- unsigned int hwirq = 33 + __fls(stat);
- handle_IRQ(hwirq, regs);
+ generic_handle_irq(33 + __fls(stat));
return;
}
}
diff --git a/arch/arm/mach-mv78xx0/irq.c b/arch/arm/mach-mv78xx0/irq.c
index a34b6855fb19..6114ccbcdab2 100644
--- a/arch/arm/mach-mv78xx0/irq.c
+++ b/arch/arm/mach-mv78xx0/irq.c
@@ -31,22 +31,19 @@ __exception_irq_entry mv78xx0_legacy_handle_irq(struct pt_regs *regs)
stat = readl_relaxed(mv78xx0_irq_base + IRQ_CAUSE_LOW_OFF);
stat &= readl_relaxed(mv78xx0_irq_base + IRQ_MASK_LOW_OFF);
if (stat) {
- unsigned int hwirq = __fls(stat);
- handle_IRQ(hwirq, regs);
+ generic_handle_irq(__fls(stat));
return;
}
stat = readl_relaxed(mv78xx0_irq_base + IRQ_CAUSE_HIGH_OFF);
stat &= readl_relaxed(mv78xx0_irq_base + IRQ_MASK_HIGH_OFF);
if (stat) {
- unsigned int hwirq = 32 + __fls(stat);
- handle_IRQ(hwirq, regs);
+ generic_handle_irq(32 + __fls(stat));
return;
}
stat = readl_relaxed(mv78xx0_irq_base + IRQ_CAUSE_ERR_OFF);
stat &= readl_relaxed(mv78xx0_irq_base + IRQ_MASK_ERR_OFF);
if (stat) {
- unsigned int hwirq = 64 + __fls(stat);
- handle_IRQ(hwirq, regs);
+ generic_handle_irq(64 + __fls(stat));
return;
}
}
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c
index e17727e53cb4..41d08934a918 100644
--- a/arch/arm/mach-orion5x/irq.c
+++ b/arch/arm/mach-orion5x/irq.c
@@ -31,8 +31,7 @@ __exception_irq_entry orion5x_legacy_handle_irq(struct pt_regs *regs)
stat = readl_relaxed(MAIN_IRQ_CAUSE);
stat &= readl_relaxed(MAIN_IRQ_MASK);
if (stat) {
- unsigned int hwirq = 1 + __fls(stat);
- handle_IRQ(hwirq, regs);
+ generic_handle_irq(1 + __fls(stat));
return;
}
}
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 96f33ef1d9ea..1fe551b60eed 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -101,7 +101,7 @@ asmlinkage void __exception_irq_entry icip_handle_irq(struct pt_regs *regs)
if (mask == 0)
break;
- handle_IRQ(PXA_IRQ(fls(mask) - 1), regs);
+ generic_handle_irq(PXA_IRQ(fls(mask) - 1));
} while (1);
}
@@ -115,7 +115,7 @@ asmlinkage void __exception_irq_entry ichp_handle_irq(struct pt_regs *regs)
if ((ichp & ICHP_VAL_IRQ) == 0)
break;
- handle_IRQ(PXA_IRQ(ICHP_IRQ(ichp)), regs);
+ generic_handle_irq(PXA_IRQ(ICHP_IRQ(ichp)));
} while (1);
}
--
2.39.0