Commit 4c301f9b authored by Palmer Dabbelt's avatar Palmer Dabbelt Committed by Thomas Gleixner

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: default avatarPalmer Dabbelt <palmer@sifive.com>
Signed-off-by: default avatarThomas 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
parent 08fb550c
...@@ -337,8 +337,8 @@ config ARCH_MULTIPLATFORM ...@@ -337,8 +337,8 @@ config ARCH_MULTIPLATFORM
select TIMER_OF select TIMER_OF
select COMMON_CLK select COMMON_CLK
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select GENERIC_IRQ_MULTI_HANDLER
select MIGHT_HAVE_PCI select MIGHT_HAVE_PCI
select MULTI_IRQ_HANDLER
select PCI_DOMAINS if PCI select PCI_DOMAINS if PCI
select SPARSE_IRQ select SPARSE_IRQ
select USE_OF select USE_OF
...@@ -465,9 +465,9 @@ config ARCH_DOVE ...@@ -465,9 +465,9 @@ config ARCH_DOVE
bool "Marvell Dove" bool "Marvell Dove"
select CPU_PJ4 select CPU_PJ4
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select GENERIC_IRQ_MULTI_HANDLER
select GPIOLIB select GPIOLIB
select MIGHT_HAVE_PCI select MIGHT_HAVE_PCI
select MULTI_IRQ_HANDLER
select MVEBU_MBUS select MVEBU_MBUS
select PINCTRL select PINCTRL
select PINCTRL_DOVE select PINCTRL_DOVE
...@@ -512,8 +512,8 @@ config ARCH_LPC32XX ...@@ -512,8 +512,8 @@ config ARCH_LPC32XX
select COMMON_CLK select COMMON_CLK
select CPU_ARM926T select CPU_ARM926T
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select GENERIC_IRQ_MULTI_HANDLER
select GPIOLIB select GPIOLIB
select MULTI_IRQ_HANDLER
select SPARSE_IRQ select SPARSE_IRQ
select USE_OF select USE_OF
help help
...@@ -532,11 +532,11 @@ config ARCH_PXA ...@@ -532,11 +532,11 @@ config ARCH_PXA
select TIMER_OF select TIMER_OF
select CPU_XSCALE if !CPU_XSC3 select CPU_XSCALE if !CPU_XSC3
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select GENERIC_IRQ_MULTI_HANDLER
select GPIO_PXA select GPIO_PXA
select GPIOLIB select GPIOLIB
select HAVE_IDE select HAVE_IDE
select IRQ_DOMAIN select IRQ_DOMAIN
select MULTI_IRQ_HANDLER
select PLAT_PXA select PLAT_PXA
select SPARSE_IRQ select SPARSE_IRQ
help help
...@@ -572,11 +572,11 @@ config ARCH_SA1100 ...@@ -572,11 +572,11 @@ config ARCH_SA1100
select CPU_FREQ select CPU_FREQ
select CPU_SA1100 select CPU_SA1100
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select GENERIC_IRQ_MULTI_HANDLER
select GPIOLIB select GPIOLIB
select HAVE_IDE select HAVE_IDE
select IRQ_DOMAIN select IRQ_DOMAIN
select ISA select ISA
select MULTI_IRQ_HANDLER
select NEED_MACH_MEMORY_H select NEED_MACH_MEMORY_H
select SPARSE_IRQ select SPARSE_IRQ
help help
...@@ -590,10 +590,10 @@ config ARCH_S3C24XX ...@@ -590,10 +590,10 @@ config ARCH_S3C24XX
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select GPIO_SAMSUNG select GPIO_SAMSUNG
select GPIOLIB select GPIOLIB
select GENERIC_IRQ_MULTI_HANDLER
select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_I2C if I2C
select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C2410_WATCHDOG if WATCHDOG
select HAVE_S3C_RTC if RTC_CLASS select HAVE_S3C_RTC if RTC_CLASS
select MULTI_IRQ_HANDLER
select NEED_MACH_IO_H select NEED_MACH_IO_H
select SAMSUNG_ATAGS select SAMSUNG_ATAGS
select USE_OF select USE_OF
...@@ -627,10 +627,10 @@ config ARCH_OMAP1 ...@@ -627,10 +627,10 @@ config ARCH_OMAP1
select CLKSRC_MMIO select CLKSRC_MMIO
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select GENERIC_IRQ_CHIP select GENERIC_IRQ_CHIP
select GENERIC_IRQ_MULTI_HANDLER
select GPIOLIB select GPIOLIB
select HAVE_IDE select HAVE_IDE
select IRQ_DOMAIN select IRQ_DOMAIN
select MULTI_IRQ_HANDLER
select NEED_MACH_IO_H if PCCARD select NEED_MACH_IO_H if PCCARD
select NEED_MACH_MEMORY_H select NEED_MACH_MEMORY_H
select SPARSE_IRQ select SPARSE_IRQ
...@@ -921,11 +921,6 @@ config IWMMXT ...@@ -921,11 +921,6 @@ config IWMMXT
Enable support for iWMMXt context switching at run time if Enable support for iWMMXt context switching at run time if
running on a CPU that supports it. running on a CPU that supports it.
config MULTI_IRQ_HANDLER
bool
help
Allow each machine to specify it's own IRQ handler at run time.
if !MMU if !MMU
source "arch/arm/Kconfig-nommu" source "arch/arm/Kconfig-nommu"
endif endif
......
...@@ -31,11 +31,6 @@ extern void asm_do_IRQ(unsigned int, struct pt_regs *); ...@@ -31,11 +31,6 @@ extern void asm_do_IRQ(unsigned int, struct pt_regs *);
void handle_IRQ(unsigned int, struct pt_regs *); void handle_IRQ(unsigned int, struct pt_regs *);
void init_IRQ(void); void init_IRQ(void);
#ifdef CONFIG_MULTI_IRQ_HANDLER
extern void (*handle_arch_irq)(struct pt_regs *);
extern void set_handle_irq(void (*handle_irq)(struct pt_regs *));
#endif
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask, extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
bool exclude_self); bool exclude_self);
......
...@@ -59,7 +59,7 @@ struct machine_desc { ...@@ -59,7 +59,7 @@ struct machine_desc {
void (*init_time)(void); void (*init_time)(void);
void (*init_machine)(void); void (*init_machine)(void);
void (*init_late)(void); void (*init_late)(void);
#ifdef CONFIG_MULTI_IRQ_HANDLER #ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER
void (*handle_irq)(struct pt_regs *); void (*handle_irq)(struct pt_regs *);
#endif #endif
void (*restart)(enum reboot_mode, const char *); void (*restart)(enum reboot_mode, const char *);
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <asm/glue-df.h> #include <asm/glue-df.h>
#include <asm/glue-pf.h> #include <asm/glue-pf.h>
#include <asm/vfpmacros.h> #include <asm/vfpmacros.h>
#ifndef CONFIG_MULTI_IRQ_HANDLER #ifndef CONFIG_GENERIC_IRQ_MULTI_HANDLER
#include <mach/entry-macro.S> #include <mach/entry-macro.S>
#endif #endif
#include <asm/thread_notify.h> #include <asm/thread_notify.h>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
* Interrupt handling. * Interrupt handling.
*/ */
.macro irq_handler .macro irq_handler
#ifdef CONFIG_MULTI_IRQ_HANDLER #ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER
ldr r1, =handle_arch_irq ldr r1, =handle_arch_irq
mov r0, sp mov r0, sp
badr lr, 9997f badr lr, 9997f
...@@ -1226,9 +1226,3 @@ vector_addrexcptn: ...@@ -1226,9 +1226,3 @@ vector_addrexcptn:
.globl cr_alignment .globl cr_alignment
cr_alignment: cr_alignment:
.space 4 .space 4
#ifdef CONFIG_MULTI_IRQ_HANDLER
.globl handle_arch_irq
handle_arch_irq:
.space 4
#endif
...@@ -102,16 +102,6 @@ void __init init_IRQ(void) ...@@ -102,16 +102,6 @@ void __init init_IRQ(void)
uniphier_cache_init(); uniphier_cache_init();
} }
#ifdef CONFIG_MULTI_IRQ_HANDLER
void __init set_handle_irq(void (*handle_irq)(struct pt_regs *))
{
if (handle_arch_irq)
return;
handle_arch_irq = handle_irq;
}
#endif
#ifdef CONFIG_SPARSE_IRQ #ifdef CONFIG_SPARSE_IRQ
int __init arch_probe_nr_irqs(void) int __init arch_probe_nr_irqs(void)
{ {
......
...@@ -1145,7 +1145,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -1145,7 +1145,7 @@ void __init setup_arch(char **cmdline_p)
reserve_crashkernel(); reserve_crashkernel();
#ifdef CONFIG_MULTI_IRQ_HANDLER #ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER
handle_arch_irq = mdesc->handle_irq; handle_arch_irq = mdesc->handle_irq;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment