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

ARM: 9298/1: Drop custom mdesc->handle_irq()

ARM exclusively uses GENERIC_IRQ_MULTI_HANDLER, so at some point
set_handle_irq() needs to be called to handle system-wide
interrupts.

For all DT-enabled boards, this call happens down in the
drivers/irqchip subsystem, after locating the target irqchip
driver from the device tree.

We still have a few instances of the boardfiles with machine
descriptors passing a machine-specific .handle_irq() to the
ARM kernel core.

Get rid of this by letting the few remaining machines consistently
call set_handle_irq() from the end of the .init_irq() callback
instead and diet down one member from the machine descriptor.

Cc: Marc Zyngier <maz@kernel.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

authored by

Linus Walleij and committed by
Russell King (Oracle)
5bb578a0 ac9a7868

+6 -27
-1
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 - void (*handle_irq)(struct pt_regs *); 60 59 void (*restart)(enum reboot_mode, const char *); 61 60 }; 62 61
-4
arch/arm/kernel/setup.c
··· 1198 1198 1199 1199 reserve_crashkernel(); 1200 1200 1201 - #ifdef CONFIG_GENERIC_IRQ_MULTI_HANDLER 1202 - handle_arch_irq = mdesc->handle_irq; 1203 - #endif 1204 - 1205 1201 #ifdef CONFIG_VT 1206 1202 #if defined(CONFIG_VGA_CONSOLE) 1207 1203 conswitchp = &vga_con;
-2
arch/arm/mach-mxs/mach-mxs.c
··· 11 11 #include <linux/err.h> 12 12 #include <linux/gpio.h> 13 13 #include <linux/init.h> 14 - #include <linux/irqchip/mxs.h> 15 14 #include <linux/reboot.h> 16 15 #include <linux/micrel_phy.h> 17 16 #include <linux/of_address.h> ··· 471 472 }; 472 473 473 474 DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)") 474 - .handle_irq = icoll_handle_irq, 475 475 .init_machine = mxs_machine_init, 476 476 .init_late = mxs_pm_init, 477 477 .dt_compat = mxs_dt_compat,
-1
arch/arm/mach-omap1/board-ams-delta.c
··· 877 877 .map_io = ams_delta_map_io, 878 878 .init_early = omap1_init_early, 879 879 .init_irq = omap1_init_irq, 880 - .handle_irq = omap1_handle_irq, 881 880 .init_machine = ams_delta_init, 882 881 .init_late = ams_delta_init_late, 883 882 .init_time = omap1_timer_init,
-1
arch/arm/mach-omap1/board-nokia770.c
··· 291 291 .map_io = omap1_map_io, 292 292 .init_early = omap1_init_early, 293 293 .init_irq = omap1_init_irq, 294 - .handle_irq = omap1_handle_irq, 295 294 .init_machine = omap_nokia770_init, 296 295 .init_late = omap1_init_late, 297 296 .init_time = omap1_timer_init,
-1
arch/arm/mach-omap1/board-osk.c
··· 389 389 .map_io = omap1_map_io, 390 390 .init_early = omap1_init_early, 391 391 .init_irq = omap1_init_irq, 392 - .handle_irq = omap1_handle_irq, 393 392 .init_machine = osk_init, 394 393 .init_late = omap1_init_late, 395 394 .init_time = omap1_timer_init,
-1
arch/arm/mach-omap1/board-palmte.c
··· 259 259 .map_io = omap1_map_io, 260 260 .init_early = omap1_init_early, 261 261 .init_irq = omap1_init_irq, 262 - .handle_irq = omap1_handle_irq, 263 262 .init_machine = omap_palmte_init, 264 263 .init_late = omap1_init_late, 265 264 .init_time = omap1_timer_init,
-1
arch/arm/mach-omap1/board-sx1.c
··· 338 338 .map_io = omap1_map_io, 339 339 .init_early = omap1_init_early, 340 340 .init_irq = omap1_init_irq, 341 - .handle_irq = omap1_handle_irq, 342 341 .init_machine = omap_sx1_init, 343 342 .init_late = omap1_init_late, 344 343 .init_time = omap1_timer_init,
+3
arch/arm/mach-omap1/irq.c
··· 37 37 */ 38 38 #include <linux/gpio.h> 39 39 #include <linux/init.h> 40 + #include <linux/irq.h> 40 41 #include <linux/module.h> 41 42 #include <linux/sched.h> 42 43 #include <linux/interrupt.h> ··· 255 254 ct = irq_data_get_chip_type(d); 256 255 ct->chip.irq_unmask(d); 257 256 } 257 + 258 + set_handle_irq(omap1_handle_irq); 258 259 }
-1
arch/arm/mach-pxa/gumstix.c
··· 233 233 .map_io = pxa25x_map_io, 234 234 .nr_irqs = PXA_NR_IRQS, 235 235 .init_irq = pxa25x_init_irq, 236 - .handle_irq = pxa25x_handle_irq, 237 236 .init_time = pxa_timer_init, 238 237 .init_machine = gumstix_init, 239 238 .restart = pxa_restart,
+1
arch/arm/mach-pxa/pxa25x.c
··· 143 143 void __init pxa25x_init_irq(void) 144 144 { 145 145 pxa_init_irq(32, pxa25x_set_wake); 146 + set_handle_irq(pxa25x_handle_irq); 146 147 } 147 148 148 149 static int __init __init
+1
arch/arm/mach-pxa/pxa27x.c
··· 228 228 void __init pxa27x_init_irq(void) 229 229 { 230 230 pxa_init_irq(34, pxa27x_set_wake); 231 + set_handle_irq(pxa27x_handle_irq); 231 232 } 232 233 233 234 static int __init
-3
arch/arm/mach-pxa/spitz.c
··· 1043 1043 .map_io = pxa27x_map_io, 1044 1044 .nr_irqs = PXA_NR_IRQS, 1045 1045 .init_irq = pxa27x_init_irq, 1046 - .handle_irq = pxa27x_handle_irq, 1047 1046 .init_machine = spitz_init, 1048 1047 .init_time = pxa_timer_init, 1049 1048 .restart = spitz_restart, ··· 1055 1056 .map_io = pxa27x_map_io, 1056 1057 .nr_irqs = PXA_NR_IRQS, 1057 1058 .init_irq = pxa27x_init_irq, 1058 - .handle_irq = pxa27x_handle_irq, 1059 1059 .init_machine = spitz_init, 1060 1060 .init_time = pxa_timer_init, 1061 1061 .restart = spitz_restart, ··· 1067 1069 .map_io = pxa27x_map_io, 1068 1070 .nr_irqs = PXA_NR_IRQS, 1069 1071 .init_irq = pxa27x_init_irq, 1070 - .handle_irq = pxa27x_handle_irq, 1071 1072 .init_machine = spitz_init, 1072 1073 .init_time = pxa_timer_init, 1073 1074 .restart = spitz_restart,
+1
drivers/irqchip/irq-mxs.c
··· 201 201 stmp_reset_block(icoll_priv.ctrl); 202 202 203 203 icoll_add_domain(np, ICOLL_NUM_IRQS); 204 + set_handle_irq(icoll_handle_irq); 204 205 205 206 return 0; 206 207 }
-11
include/linux/irqchip/mxs.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 2 - /* 3 - * Copyright (C) 2013 Freescale Semiconductor, Inc. 4 - */ 5 - 6 - #ifndef __LINUX_IRQCHIP_MXS_H 7 - #define __LINUX_IRQCHIP_MXS_H 8 - 9 - extern void icoll_handle_irq(struct pt_regs *); 10 - 11 - #endif