[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230215073217.18269-1-bw365.lee@samsung.com>
Date: Wed, 15 Feb 2023 16:32:17 +0900
From: Bumwoo Lee <bw365.lee@...sung.com>
To: Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org
Cc: Bumwoo Lee <bw365.lee@...sung.com>
Subject: [PATCH] kernel/irq/manage.c: print irq name when unbalanced irq
enable.
To make easy for debugging,
let's print desc->name at the time of the problem.
[3-32714.6377] Unbalanced enable for IRQ 69 (2800000.sdp_dvde)
Signed-off-by: Bumwoo Lee <bw365.lee@...sung.com>
---
kernel/irq/manage.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 8ce75495e04f..161138998d8d 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -781,8 +781,8 @@ void __enable_irq(struct irq_desc *desc)
switch (desc->depth) {
case 0:
err_out:
- WARN(1, KERN_WARNING "Unbalanced enable for IRQ %d\n",
- irq_desc_get_irq(desc));
+ WARN(1, "Unbalanced enable for IRQ %d (%s)\n",
+ irq_desc_get_irq(desc), desc->name ? desc->name : "Null");
break;
case 1: {
if (desc->istate & IRQS_SUSPENDED)
@@ -823,7 +823,8 @@ void enable_irq(unsigned int irq)
if (!desc)
return;
if (WARN(!desc->irq_data.chip,
- KERN_ERR "enable_irq before setup/request_irq: irq %u\n", irq))
+ "%s before setup/request_irq: irq %u (%s)\n",
+ __func__, irq, desc->name ? desc->name : "Null"))
goto out;
__enable_irq(desc);
@@ -907,7 +908,8 @@ int irq_set_irq_wake(unsigned int irq, unsigned int on)
}
} else {
if (desc->wake_depth == 0) {
- WARN(1, "Unbalanced IRQ %d wake disable\n", irq);
+ WARN(1, "Unbalanced IRQ %d (%s) wake disable\n", irq,
+ desc->name ? desc->name : "Null");
} else if (--desc->wake_depth == 0) {
ret = set_irq_wake_real(irq, on);
if (ret)
--
2.35.1
Powered by blists - more mailing lists