diff options
author | Zhen Lei <thunder.leizhen@huawei.com> | 2020-09-24 10:17:49 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-09-25 18:33:57 +0300 |
commit | ea0c80d1764449acf2f70fdb25aec33800cd0348 (patch) | |
tree | 04a8bfc4d8b1c2aedf02a53a1239f893d4944ea9 /include/linux/irq.h | |
parent | f4d51dffc6c01a9e94650d95ce0104964f8ae822 (diff) | |
download | linux-ea0c80d1764449acf2f70fdb25aec33800cd0348.tar.xz |
genirq: Add stub for set_handle_irq() when !GENERIC_IRQ_MULTI_HANDLER
In order to avoid compilation errors when a driver references set_handle_irq(),
but that the architecture doesn't select GENERIC_IRQ_MULTI_HANDLER,
add a stub function that will just WARN_ON_ONCE() if ever used.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
[maz: commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200924071754.4509-2-thunder.leizhen@huawei.com
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r-- | include/linux/irq.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 1b7f4dfee35b..b167baef88c0 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -1252,6 +1252,12 @@ int __init set_handle_irq(void (*handle_irq)(struct pt_regs *)); * top-level IRQ handler. */ extern void (*handle_arch_irq)(struct pt_regs *) __ro_after_init; +#else +#define set_handle_irq(handle_irq) \ + do { \ + (void)handle_irq; \ + WARN_ON(1); \ + } while (0) #endif #endif /* _LINUX_IRQ_H */ |