Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+7 −12
Original line number Diff line number Diff line
@@ -337,8 +337,8 @@ config ARCH_MULTIPLATFORM
	select TIMER_OF
	select COMMON_CLK
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_MULTI_HANDLER
	select MIGHT_HAVE_PCI
	select MULTI_IRQ_HANDLER
	select PCI_DOMAINS if PCI
	select SPARSE_IRQ
	select USE_OF
@@ -465,9 +465,9 @@ config ARCH_DOVE
	bool "Marvell Dove"
	select CPU_PJ4
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_MULTI_HANDLER
	select GPIOLIB
	select MIGHT_HAVE_PCI
	select MULTI_IRQ_HANDLER
	select MVEBU_MBUS
	select PINCTRL
	select PINCTRL_DOVE
@@ -512,8 +512,8 @@ config ARCH_LPC32XX
	select COMMON_CLK
	select CPU_ARM926T
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_MULTI_HANDLER
	select GPIOLIB
	select MULTI_IRQ_HANDLER
	select SPARSE_IRQ
	select USE_OF
	help
@@ -532,11 +532,11 @@ config ARCH_PXA
	select TIMER_OF
	select CPU_XSCALE if !CPU_XSC3
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_MULTI_HANDLER
	select GPIO_PXA
	select GPIOLIB
	select HAVE_IDE
	select IRQ_DOMAIN
	select MULTI_IRQ_HANDLER
	select PLAT_PXA
	select SPARSE_IRQ
	help
@@ -572,11 +572,11 @@ config ARCH_SA1100
	select CPU_FREQ
	select CPU_SA1100
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_MULTI_HANDLER
	select GPIOLIB
	select HAVE_IDE
	select IRQ_DOMAIN
	select ISA
	select MULTI_IRQ_HANDLER
	select NEED_MACH_MEMORY_H
	select SPARSE_IRQ
	help
@@ -590,10 +590,10 @@ config ARCH_S3C24XX
	select GENERIC_CLOCKEVENTS
	select GPIO_SAMSUNG
	select GPIOLIB
	select GENERIC_IRQ_MULTI_HANDLER
	select HAVE_S3C2410_I2C if I2C
	select HAVE_S3C2410_WATCHDOG if WATCHDOG
	select HAVE_S3C_RTC if RTC_CLASS
	select MULTI_IRQ_HANDLER
	select NEED_MACH_IO_H
	select SAMSUNG_ATAGS
	select USE_OF
@@ -627,10 +627,10 @@ config ARCH_OMAP1
	select CLKSRC_MMIO
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_CHIP
	select GENERIC_IRQ_MULTI_HANDLER
	select GPIOLIB
	select HAVE_IDE
	select IRQ_DOMAIN
	select MULTI_IRQ_HANDLER
	select NEED_MACH_IO_H if PCCARD
	select NEED_MACH_MEMORY_H
	select SPARSE_IRQ
@@ -921,11 +921,6 @@ config IWMMXT
	  Enable support for iWMMXt context switching at run time if
	  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
source "arch/arm/Kconfig-nommu"
endif
+0 −5
Original line number Diff line number Diff line
@@ -31,11 +31,6 @@ extern void asm_do_IRQ(unsigned int, struct pt_regs *);
void handle_IRQ(unsigned int, struct pt_regs *);
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
extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
					   bool exclude_self);
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ struct machine_desc {
	void			(*init_time)(void);
	void			(*init_machine)(void);
	void			(*init_late)(void);
#ifdef CONFIG_MULTI_IRQ_HANDLER
#ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER
	void			(*handle_irq)(struct pt_regs *);
#endif
	void			(*restart)(enum reboot_mode, const char *);
+2 −8
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
#include <asm/glue-df.h>
#include <asm/glue-pf.h>
#include <asm/vfpmacros.h>
#ifndef CONFIG_MULTI_IRQ_HANDLER
#ifndef CONFIG_GENERIC_IRQ_MULTI_HANDLER
#include <mach/entry-macro.S>
#endif
#include <asm/thread_notify.h>
@@ -39,7 +39,7 @@
 * Interrupt handling.
 */
	.macro	irq_handler
#ifdef CONFIG_MULTI_IRQ_HANDLER
#ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER
	ldr	r1, =handle_arch_irq
	mov	r0, sp
	badr	lr, 9997f
@@ -1226,9 +1226,3 @@ vector_addrexcptn:
	.globl	cr_alignment
cr_alignment:
	.space	4

#ifdef CONFIG_MULTI_IRQ_HANDLER
	.globl	handle_arch_irq
handle_arch_irq:
	.space	4
#endif
+0 −10
Original line number Diff line number Diff line
@@ -102,16 +102,6 @@ void __init init_IRQ(void)
	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
int __init arch_probe_nr_irqs(void)
{
Loading