aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Zyngier <[email protected]>2021-03-15 11:56:24 +0000
committerCatalin Marinas <[email protected]>2021-03-24 20:19:29 +0000
commitb0b8b689d78c9666a991e1cc87c3dad4c261007f (patch)
treea036d9e832019e2cbaac0053a5caec6e54a12431
parent1e28eed17697bcf343c6743f0028cc3b5dd88bf0 (diff)
genirq: Allow architectures to override set_handle_irq() fallback
Some architectures want to provide the generic set_handle_irq() API, but for structural reasons need to provide their own implementation. For example, arm64 needs to do this to provide uniform set_handle_irq() and set_handle_fiq() registration functions. Make this possible by allowing architectures to provide their own implementation of set_handle_irq when CONFIG_GENERIC_IRQ_MULTI_HANDLER is not selected. Signed-off-by: Marc Zyngier <[email protected]> [Mark: expand commit message] Signed-off-by: Mark Rutland <[email protected]> Tested-by: Hector Martin <[email protected]> Cc: James Morse <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
-rw-r--r--include/linux/irq.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 2efde6a79b7e..9890180b84fd 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -1258,11 +1258,13 @@ int __init set_handle_irq(void (*handle_irq)(struct pt_regs *));
*/
extern void (*handle_arch_irq)(struct pt_regs *) __ro_after_init;
#else
+#ifndef set_handle_irq
#define set_handle_irq(handle_irq) \
do { \
(void)handle_irq; \
WARN_ON(1); \
} while (0)
#endif
+#endif
#endif /* _LINUX_IRQ_H */