ARM: irq: remove handle_IRQ() for good
Subsystems (4)
PATCH 1/1 ARM: irq: remove handle_IRQ() for good
From: Arnd Bergmann <[email protected]>
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.
--- 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(-)
arch/arm/include/asm/irq.h +0 -4
@@ -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
arch/arm/kernel/irq.c +0 -25
@@ -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;
arch/arm/mach-dove/irq.c +2 -4
@@ -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 ; } }
arch/arm/mach-mv78xx0/irq.c +3 -6
@@ -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 ; } }
arch/arm/mach-orion5x/irq.c +1 -2
@@ -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 ; } }
arch/arm/mach-pxa/irq.c +2 -2
@@ -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 ); }
Signature · 7 lines
2.39.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 7 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The only difference between
generic_handle_irq()and the ARMhandle_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.
For PXA:
Cheers.
--
Robert
Quoted 8 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The only difference between
generic_handle_irq()and the ARMhandle_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.
Quoted 8 lines
Signed-off-by Arnd Bergmann <[email protected]>--- 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 ++--
For mvebu related platform
Thanks,
Gregory
Quoted 144 lines
6 files changed, 8 insertions(+), 43 deletions(-)arch/arm/include/asm/irq.h +0
-4@@ -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 arch/arm/kernel/irq.c +0
-25@@ -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;arch/arm/mach-dove/irq.c +2
-4@@ -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 ; } }arch/arm/mach-mv78xx0/irq.c +3
-6@@ -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 ; } }arch/arm/mach-orion5x/irq.c +1
-2@@ -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 ; } }arch/arm/mach-pxa/irq.c +2
-2@@ -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 ); }Signature · 1 line
2.39.0
Signature · 3 lines
Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com