Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: remove old-style irq entry

The last user of arch_irq_handler_default is gone now, so the
entry-macro-multi.S file and all references to mach/entry-macro.S can
be removed, as well as the asm_do_IRQ() entrypoint into the interrupt
handling routines implemented in C.

Note: The ARMv7-M entry still uses its own top-level IRQ entry, calling
nvic_handle_irq() from assembly. This could be changed to go through
generic_handle_arch_irq() as well, but it's unclear to me if there are
any benefits.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[ardb: keep irq_handler macro as it carries all the IRQ stack handling]
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Marc Zyngier <maz@kernel.org>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Arnd Bergmann and committed by
Ard Biesheuvel
54f481a2 6f5d248d

+2 -56
+2 -12
arch/arm/Kconfig
··· 58 58 select GENERIC_CPU_AUTOPROBE 59 59 select GENERIC_EARLY_IOREMAP 60 60 select GENERIC_IDLE_POLL_SETUP 61 + select GENERIC_IRQ_MULTI_HANDLER if MMU 61 62 select GENERIC_IRQ_PROBE 62 63 select GENERIC_IRQ_SHOW 63 64 select GENERIC_IRQ_SHOW_LEVEL ··· 321 320 select AUTO_ZRELADDR 322 321 select TIMER_OF 323 322 select COMMON_CLK 324 - select GENERIC_IRQ_MULTI_HANDLER 325 323 select HAVE_PCI 326 324 select PCI_DOMAINS_GENERIC if PCI 327 325 select SPARSE_IRQ ··· 344 344 select ARM_AMBA 345 345 imply ARM_PATCH_PHYS_VIRT 346 346 select ARM_VIC 347 - select GENERIC_IRQ_MULTI_HANDLER 348 347 select AUTO_ZRELADDR 349 348 select CLKSRC_MMIO 350 349 select CPU_ARM920T ··· 358 359 select FOOTBRIDGE 359 360 select NEED_MACH_IO_H if !MMU 360 361 select NEED_MACH_MEMORY_H 361 - select GENERIC_IRQ_MULTI_HANDLER 362 362 help 363 363 Support for systems based on the DC21285 companion chip 364 364 ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. ··· 366 368 bool "IOP32x-based" 367 369 depends on MMU 368 370 select CPU_XSCALE 369 - select GENERIC_IRQ_MULTI_HANDLER 370 371 select GPIO_IOP 371 372 select GPIOLIB 372 373 select FORCE_PCI ··· 381 384 select ARCH_SUPPORTS_BIG_ENDIAN 382 385 select CPU_XSCALE 383 386 select DMABOUNCE if PCI 384 - select GENERIC_IRQ_MULTI_HANDLER 385 387 select GPIO_IXP4XX 386 388 select GPIOLIB 387 389 select HAVE_PCI ··· 396 400 config ARCH_DOVE 397 401 bool "Marvell Dove" 398 402 select CPU_PJ4 399 - select GENERIC_IRQ_MULTI_HANDLER 400 403 select GPIOLIB 401 404 select HAVE_PCI 402 405 select MVEBU_MBUS ··· 418 423 select CLKSRC_MMIO 419 424 select TIMER_OF 420 425 select CPU_XSCALE if !CPU_XSC3 421 - select GENERIC_IRQ_MULTI_HANDLER 422 426 select GPIO_PXA 423 427 select GPIOLIB 424 428 select IRQ_DOMAIN ··· 436 442 select ARM_HAS_SG_CHAIN 437 443 select CPU_SA110 438 444 select FIQ 439 - select GENERIC_IRQ_MULTI_HANDLER 440 445 select HAVE_PATA_PLATFORM 441 446 select ISA_DMA_API 442 447 select LEGACY_TIMER_TICK ··· 456 463 select COMMON_CLK 457 464 select CPU_FREQ 458 465 select CPU_SA1100 459 - select GENERIC_IRQ_MULTI_HANDLER 460 466 select GPIOLIB 461 467 select IRQ_DOMAIN 462 468 select ISA ··· 470 478 select CLKSRC_SAMSUNG_PWM 471 479 select GPIO_SAMSUNG 472 480 select GPIOLIB 473 - select GENERIC_IRQ_MULTI_HANDLER 474 481 select HAVE_S3C2410_I2C if I2C 475 482 select NEED_MACH_IO_H 476 483 select S3C2410_WATCHDOG ··· 488 497 select ARCH_OMAP 489 498 select CLKSRC_MMIO 490 499 select GENERIC_IRQ_CHIP 491 - select GENERIC_IRQ_MULTI_HANDLER 492 500 select GPIOLIB 493 501 select HAVE_LEGACY_CLK 494 502 select IRQ_DOMAIN ··· 1158 1168 1159 1169 config IRQSTACKS 1160 1170 def_bool y 1161 - depends on GENERIC_IRQ_MULTI_HANDLER && THREAD_INFO_IN_TASK 1171 + depends on THREAD_INFO_IN_TASK 1162 1172 select HAVE_IRQ_EXIT_ON_IRQ_STACK 1163 1173 select HAVE_SOFTIRQ_ON_OWN_STACK 1164 1174
-16
arch/arm/include/asm/entry-macro-multi.S
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #include <asm/assembler.h> 3 - 4 - /* 5 - * Interrupt handling. Preserves r7, r8, r9 6 - */ 7 - .macro arch_irq_handler_default 8 - get_irqnr_preamble r6, lr 9 - 1: get_irqnr_and_base r0, r2, r6, lr 10 - movne r1, sp 11 - @ 12 - @ routine called with r0 = irq number, r1 = struct pt_regs * 13 - @ 14 - badrne lr, 1b 15 - bne asm_do_IRQ 16 - .endm
-1
arch/arm/include/asm/irq.h
··· 26 26 struct irqaction; 27 27 struct pt_regs; 28 28 29 - extern void asm_do_IRQ(unsigned int, struct pt_regs *); 30 29 void handle_IRQ(unsigned int, struct pt_regs *); 31 30 void init_IRQ(void); 32 31
-2
arch/arm/include/asm/mach/arch.h
··· 56 56 void (*init_time)(void); 57 57 void (*init_machine)(void); 58 58 void (*init_late)(void); 59 - #ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER 60 59 void (*handle_irq)(struct pt_regs *); 61 - #endif 62 60 void (*restart)(enum reboot_mode, const char *); 63 61 }; 64 62
-8
arch/arm/kernel/entry-armv.S
··· 19 19 #include <asm/glue-df.h> 20 20 #include <asm/glue-pf.h> 21 21 #include <asm/vfpmacros.h> 22 - #ifndef CONFIG_GENERIC_IRQ_MULTI_HANDLER 23 - #include <mach/entry-macro.S> 24 - #endif 25 22 #include <asm/thread_notify.h> 26 23 #include <asm/unwind.h> 27 24 #include <asm/unistd.h> ··· 27 30 #include <asm/uaccess-asm.h> 28 31 29 32 #include "entry-header.S" 30 - #include <asm/entry-macro-multi.S> 31 33 #include <asm/probes.h> 32 34 33 35 /* 34 36 * Interrupt handling. 35 37 */ 36 38 .macro irq_handler, from_user:req 37 - #ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER 38 39 mov r0, sp 39 40 #ifdef CONFIG_IRQSTACKS 40 41 mov_l r2, irq_stack_ptr @ Take base address ··· 87 92 mov sp, r9 @ Restore original SP 88 93 #endif // CONFIG_UNWINDER_ARM 89 94 #endif // CONFIG_IRQSTACKS 90 - #else 91 - arch_irq_handler_default 92 - #endif 93 95 .endm 94 96 95 97 .macro pabt_helper
-17
arch/arm/kernel/irq.c
··· 120 120 ack_bad_irq(irq); 121 121 } 122 122 123 - /* 124 - * asm_do_IRQ is the interface to be used from assembly code. 125 - */ 126 - asmlinkage void __exception_irq_entry 127 - asm_do_IRQ(unsigned int irq, struct pt_regs *regs) 128 - { 129 - struct pt_regs *old_regs; 130 - 131 - irq_enter(); 132 - old_regs = set_irq_regs(regs); 133 - 134 - handle_IRQ(irq, regs); 135 - 136 - set_irq_regs(old_regs); 137 - irq_exit(); 138 - } 139 - 140 123 void __init init_IRQ(void) 141 124 { 142 125 int ret;