public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] genirq/chip: Fix the warn for non-SMP system
@ 2024-05-16 19:30 Mukesh Ojha
  2024-05-17  8:48 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mukesh Ojha @ 2024-05-16 19:30 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, Mukesh Ojha

__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@quicinc.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-23 20:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-16 19:30 [PATCH] genirq/chip: Fix the warn for non-SMP system Mukesh Ojha
2024-05-17  8:48 ` kernel test robot
2024-05-17  8:58 ` kernel test robot
2024-05-23 20:18 ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox