linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] genirq: better error messages for spurious IRQs
@ 2012-01-01 22:45 Edward Donovan
  0 siblings, 0 replies; only message in thread
From: Edward Donovan @ 2012-01-01 22:45 UTC (permalink / raw)
  To: tglx, torvalds; +Cc: alan, linux-kernel

We have more information than we've been giving the user, when an
IRQ goes unhandled.  Working with bug reports, I've seen plenty
of users asking why the kernel is suggesting 'irqpoll' when
they're already using it.  So, when an IRQ is disabled, this
patch just checks whether 'irqfixup' or 'irqpoll' were called,
and has three versions of the error message, accordingly:

- 'irqfixup' eats less resources, and the docs recommend trying
it first.  Now the code does the same.

- If that does not help, recommend 'irqpoll'.

- If 'irqpoll' has not helped, most likely the firmware is too
broken; say so.  Won't try to list every alternative case here.

(For clarity's sake, I'd prefer to change "nobody cared" to "not
handled", but I wouldn't want to cut the tie to archived
discussions.  So I left the former, in parentheses, once.  Not
sure just what's best.)

Signed-off-by: Edward Donovan <edward.donovan@numble.net>
---
 kernel/irq/spurious.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index dc813a9..bd2159e 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -194,9 +194,18 @@ __report_bad_irq(unsigned int irq, struct irq_desc *desc,
 	if (bad_action_ret(action_ret)) {
 		printk(KERN_ERR "irq event %d: bogus return value %x\n",
 				irq, action_ret);
+	} else if (irqfixup == 1) {
+		printk(KERN_ERR "irq %d not handled, even with \"irqfixup\": "
+				"try booting with the \"irqpoll\" option.\n",
+				irq);
+	} else if (irqfixup == 2) {
+		printk(KERN_ERR "irq %d not handled, even with \"irqpoll\": "
+				"most likely the firwmare is too broken.\n",
+				irq);
 	} else {
-		printk(KERN_ERR "irq %d: nobody cared (try booting with "
-				"the \"irqpoll\" option)\n", irq);
+		printk(KERN_ERR "irq %d not handled (nobody cared): try "
+				"booting with the \"irqfixup\" option.\n",
+				irq);
 	}
 	dump_stack();
 	printk(KERN_ERR "handlers:\n");
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-01 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-01 22:45 [PATCH v2] genirq: better error messages for spurious IRQs Edward Donovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).