Skip to content

Commit 4c301f9

Browse files
palmer-dabbeltKAGA-KOKO
authored andcommitted
ARM: Convert to GENERIC_IRQ_MULTI_HANDLER
Converts the ARM interrupt code to use the recently added GENERIC_IRQ_MULTI_HANDLER, which is essentially just a copy of ARM's existhing MULTI_IRQ_HANDLER. The only changes are: * handle_arch_irq is now defined in a generic C file instead of an arm-specific assembly file. * handle_arch_irq is now marked as __ro_after_init. Signed-off-by: Palmer Dabbelt <palmer@sifive.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: linux@armlinux.org.uk Cc: catalin.marinas@arm.com Cc: Will Deacon <will.deacon@arm.com> Cc: jonas@southpole.se Cc: stefan.kristiansson@saunalahti.fi Cc: shorne@gmail.com Cc: jason@lakedaemon.net Cc: marc.zyngier@arm.com Cc: Arnd Bergmann <arnd@arndb.de> Cc: nicolas.pitre@linaro.org Cc: vladimir.murzin@arm.com Cc: keescook@chromium.org Cc: jinb.park7@gmail.com Cc: yamada.masahiro@socionext.com Cc: alexandre.belloni@bootlin.com Cc: pombredanne@nexb.com Cc: Greg KH <gregkh@linuxfoundation.org> Cc: kstewart@linuxfoundation.org Cc: jhogan@kernel.org Cc: mark.rutland@arm.com Cc: ard.biesheuvel@linaro.org Cc: james.morse@arm.com Cc: linux-arm-kernel@lists.infradead.org Cc: openrisc@lists.librecores.org Link: https://lkml.kernel.org/r/20180622170126.6308-3-palmer@sifive.com
1 parent 08fb550 commit 4c301f9

6 files changed

Lines changed: 11 additions & 37 deletions

File tree

‎arch/arm/Kconfig‎

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ config ARCH_MULTIPLATFORM
337337
select TIMER_OF
338338
select COMMON_CLK
339339
select GENERIC_CLOCKEVENTS
340+
select GENERIC_IRQ_MULTI_HANDLER
340341
select MIGHT_HAVE_PCI
341-
select MULTI_IRQ_HANDLER
342342
select PCI_DOMAINS if PCI
343343
select SPARSE_IRQ
344344
select USE_OF
@@ -465,9 +465,9 @@ config ARCH_DOVE
465465
bool "Marvell Dove"
466466
select CPU_PJ4
467467
select GENERIC_CLOCKEVENTS
468+
select GENERIC_IRQ_MULTI_HANDLER
468469
select GPIOLIB
469470
select MIGHT_HAVE_PCI
470-
select MULTI_IRQ_HANDLER
471471
select MVEBU_MBUS
472472
select PINCTRL
473473
select PINCTRL_DOVE
@@ -512,8 +512,8 @@ config ARCH_LPC32XX
512512
select COMMON_CLK
513513
select CPU_ARM926T
514514
select GENERIC_CLOCKEVENTS
515+
select GENERIC_IRQ_MULTI_HANDLER
515516
select GPIOLIB
516-
select MULTI_IRQ_HANDLER
517517
select SPARSE_IRQ
518518
select USE_OF
519519
help
@@ -532,11 +532,11 @@ config ARCH_PXA
532532
select TIMER_OF
533533
select CPU_XSCALE if !CPU_XSC3
534534
select GENERIC_CLOCKEVENTS
535+
select GENERIC_IRQ_MULTI_HANDLER
535536
select GPIO_PXA
536537
select GPIOLIB
537538
select HAVE_IDE
538539
select IRQ_DOMAIN
539-
select MULTI_IRQ_HANDLER
540540
select PLAT_PXA
541541
select SPARSE_IRQ
542542
help
@@ -572,11 +572,11 @@ config ARCH_SA1100
572572
select CPU_FREQ
573573
select CPU_SA1100
574574
select GENERIC_CLOCKEVENTS
575+
select GENERIC_IRQ_MULTI_HANDLER
575576
select GPIOLIB
576577
select HAVE_IDE
577578
select IRQ_DOMAIN
578579
select ISA
579-
select MULTI_IRQ_HANDLER
580580
select NEED_MACH_MEMORY_H
581581
select SPARSE_IRQ
582582
help
@@ -590,10 +590,10 @@ config ARCH_S3C24XX
590590
select GENERIC_CLOCKEVENTS
591591
select GPIO_SAMSUNG
592592
select GPIOLIB
593+
select GENERIC_IRQ_MULTI_HANDLER
593594
select HAVE_S3C2410_I2C if I2C
594595
select HAVE_S3C2410_WATCHDOG if WATCHDOG
595596
select HAVE_S3C_RTC if RTC_CLASS
596-
select MULTI_IRQ_HANDLER
597597
select NEED_MACH_IO_H
598598
select SAMSUNG_ATAGS
599599
select USE_OF
@@ -627,10 +627,10 @@ config ARCH_OMAP1
627627
select CLKSRC_MMIO
628628
select GENERIC_CLOCKEVENTS
629629
select GENERIC_IRQ_CHIP
630+
select GENERIC_IRQ_MULTI_HANDLER
630631
select GPIOLIB
631632
select HAVE_IDE
632633
select IRQ_DOMAIN
633-
select MULTI_IRQ_HANDLER
634634
select NEED_MACH_IO_H if PCCARD
635635
select NEED_MACH_MEMORY_H
636636
select SPARSE_IRQ
@@ -921,11 +921,6 @@ config IWMMXT
921921
Enable support for iWMMXt context switching at run time if
922922
running on a CPU that supports it.
923923

924-
config MULTI_IRQ_HANDLER
925-
bool
926-
help
927-
Allow each machine to specify it's own IRQ handler at run time.
928-
929924
if !MMU
930925
source "arch/arm/Kconfig-nommu"
931926
endif

‎arch/arm/include/asm/irq.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ extern void asm_do_IRQ(unsigned int, struct pt_regs *);
3131
void handle_IRQ(unsigned int, struct pt_regs *);
3232
void init_IRQ(void);
3333

34-
#ifdef CONFIG_MULTI_IRQ_HANDLER
35-
extern void (*handle_arch_irq)(struct pt_regs *);
36-
extern void set_handle_irq(void (*handle_irq)(struct pt_regs *));
37-
#endif
38-
3934
#ifdef CONFIG_SMP
4035
extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
4136
bool exclude_self);

‎arch/arm/include/asm/mach/arch.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ struct machine_desc {
5959
void (*init_time)(void);
6060
void (*init_machine)(void);
6161
void (*init_late)(void);
62-
#ifdef CONFIG_MULTI_IRQ_HANDLER
62+
#ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER
6363
void (*handle_irq)(struct pt_regs *);
6464
#endif
6565
void (*restart)(enum reboot_mode, const char *);

‎arch/arm/kernel/entry-armv.S‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <asm/glue-df.h>
2323
#include <asm/glue-pf.h>
2424
#include <asm/vfpmacros.h>
25-
#ifndef CONFIG_MULTI_IRQ_HANDLER
25+
#ifndef CONFIG_GENERIC_IRQ_MULTI_HANDLER
2626
#include <mach/entry-macro.S>
2727
#endif
2828
#include <asm/thread_notify.h>
@@ -39,7 +39,7 @@
3939
* Interrupt handling.
4040
*/
4141
.macro irq_handler
42-
#ifdef CONFIG_MULTI_IRQ_HANDLER
42+
#ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER
4343
ldr r1, =handle_arch_irq
4444
mov r0, sp
4545
badr lr, 9997f
@@ -1226,9 +1226,3 @@ vector_addrexcptn:
12261226
.globl cr_alignment
12271227
cr_alignment:
12281228
.space 4
1229-
1230-
#ifdef CONFIG_MULTI_IRQ_HANDLER
1231-
.globl handle_arch_irq
1232-
handle_arch_irq:
1233-
.space 4
1234-
#endif

‎arch/arm/kernel/irq.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,6 @@ void __init init_IRQ(void)
102102
uniphier_cache_init();
103103
}
104104

105-
#ifdef CONFIG_MULTI_IRQ_HANDLER
106-
void __init set_handle_irq(void (*handle_irq)(struct pt_regs *))
107-
{
108-
if (handle_arch_irq)
109-
return;
110-
111-
handle_arch_irq = handle_irq;
112-
}
113-
#endif
114-
115105
#ifdef CONFIG_SPARSE_IRQ
116106
int __init arch_probe_nr_irqs(void)
117107
{

‎arch/arm/kernel/setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ void __init setup_arch(char **cmdline_p)
11451145

11461146
reserve_crashkernel();
11471147

1148-
#ifdef CONFIG_MULTI_IRQ_HANDLER
1148+
#ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER
11491149
handle_arch_irq = mdesc->handle_irq;
11501150
#endif
11511151

0 commit comments

Comments
 (0)