[PATCH] genirq/chip: Fix the warn for non-SMP system
From: Mukesh Ojha
Date: Thu May 16 2024 - 15:31:00 EST
__irq_startup_managed() for !SMP system returns IRQ_STARTUP_NORMAL
which may result in a WARNING during enablement of an irq i.e.,
starting a irq while it is not activated.
Fix this by appropriately returning IRQ_STARTUP_MANAGED.
[ 11.129246] ------------[ cut here ]------------
[ 11.133891] WARNING: CPU: 0 PID: 39 at kernel/irq/chip.c:243 irq_startup+0x87/0x88
[ 11.146370] CPU: 0 PID: 39 Comm: kworker/0:5 Tainted: G OE 5.15.123-perf-gc692140b4d58-dirty #1
[ 11.156289] Hardware name: Generic DT based system
[ 11.161081] Workqueue: pm pm_runtime_work
[ 11.165112] (unwind_backtrace) from [<c0108c37>] (show_stack+0xb/0xc)
[ 11.172695] (show_stack) from [<c01154d5>] (__warn+0x8d/0x8e)
[ 11.179581] (__warn) from [<c0115525>] (warn_slowpath_fmt+0x4f/0x68)
[ 11.187063] (warn_slowpath_fmt) from [<c0146d89>] (irq_startup+0x87/0x88)
[ 11.194992] (irq_startup) from [<c0144969>] (enable_irq+0x31/0x70)
[ 11.202313] (enable_irq) from [<c05726bb>]
Signed-off-by: Mukesh Ojha <quic_mojha@xxxxxxxxxxx>
---
kernel/irq/chip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index dc94e0bf2c94..a243f5ce786c 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -228,7 +228,7 @@ static __always_inline int
__irq_startup_managed(struct irq_desc *desc, const struct cpumask *aff,
bool force)
{
- return IRQ_STARTUP_NORMAL;
+ return IRQ_STARTUP_MANAGED;
}
#endif
--
2.7.4