Make the irqpoll patch less chatty (rhbz 800520)

Should look at making the frequency of checking dynamic, but this will help
the immediate problem.
This commit is contained in:
Josh Boyer 2012-03-12 14:58:06 -04:00
parent 04412e0aef
commit 25313f2bcf

View File

@ -140,12 +140,12 @@ every time during debugging).
Signed-off-by: Jeroen Van den Keybus <jeroen.vandenkeybus@gmail.com>
Make it less chatty. Josh Boyer <jwboyer@redhat.com>
======
diff -up linux-3.2-rc4.orig/kernel/irq/spurious.c
linux-3.2-rc4/kernel/irq/spurious.c
--- linux-3.2-rc4.orig/kernel/irq/spurious.c 2011-12-01 23:56:01.000000000 +0100
+++ linux-3.2-rc4/kernel/irq/spurious.c 2011-12-11 16:14:48.188377387 +0100
--- linux-2.6.orig/kernel/irq/spurious.c
+++ linux-2.6/kernel/irq/spurious.c
@@ -18,7 +18,7 @@
static int irqfixup __read_mostly;
@ -173,30 +173,25 @@ linux-3.2-rc4/kernel/irq/spurious.c
if (!i)
continue;
@@ -158,15 +159,33 @@ static void poll_spurious_irqs(unsigned
barrier();
@@ -159,14 +160,29 @@ static void poll_spurious_irqs(unsigned
if (!(state & IRQS_SPURIOUS_DISABLED))
continue;
-
- local_irq_disable();
- try_one_irq(i, desc, true);
- local_irq_enable();
+
+ /* We end up here with a disabled spurious interrupt.
+ desc->irqs_unhandled now tracks the number of times
+ the interrupt has been polled */
+
+ irq = desc->irq_data.irq;
+ if (desc->irqs_unhandled < 100) { /* 1 second delay with poll frequency 100 Hz */
+ if (desc->irqs_unhandled == 0)
+ printk("Polling IRQ %d\n", irq);
+ local_irq_disable();
+ try_one_irq(i, desc, true);
+ local_irq_enable();
+ desc->irqs_unhandled++;
+ poll_again = 1;
+ } else {
+ printk("Reenabling IRQ %d\n", irq);
+ irq_enable(desc); /* Reenable the interrupt line */
+ desc->depth--;
+ desc->istate &= (~IRQS_SPURIOUS_DISABLED);
@ -213,7 +208,7 @@ linux-3.2-rc4/kernel/irq/spurious.c
}
static inline int bad_action_ret(irqreturn_t action_ret)
@@ -177,11 +196,19 @@ static inline int bad_action_ret(irqretu
@@ -177,11 +193,19 @@ static inline int bad_action_ret(irqretu
}
/*
@ -235,7 +230,7 @@ linux-3.2-rc4/kernel/irq/spurious.c
* functioning device sharing an IRQ with the failing one)
*/
static void
@@ -302,19 +329,19 @@ void note_interrupt(unsigned int irq, st
@@ -302,19 +326,19 @@ void note_interrupt(unsigned int irq, st
}
desc->irq_count++;
@ -259,11 +254,3 @@ linux-3.2-rc4/kernel/irq/spurious.c
desc->istate |= IRQS_SPURIOUS_DISABLED;
desc->depth++;
irq_disable(desc);
======
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/