summaryrefslogtreecommitdiffstats
path: root/kernel/irq/spurious.c
diff options
context:
space:
mode:
authorAnton Arapov <anton@redhat.com>2012-10-29 11:15:37 +0100
committerAnton Arapov <anton@redhat.com>2012-10-29 11:15:37 +0100
commit7d558cd9c7b18e4b16953265aa0da45e63f3b968 (patch)
tree7135d5a810768c9c619346282ee9cfdf1765e225 /kernel/irq/spurious.c
parent985ef6b2108ed28ffd5f6630e1e0fce2e2a775f2 (diff)
downloadkernel-uprobes-7d558cd9c7b18e4b16953265aa0da45e63f3b968.tar.gz
kernel-uprobes-7d558cd9c7b18e4b16953265aa0da45e63f3b968.tar.xz
kernel-uprobes-7d558cd9c7b18e4b16953265aa0da45e63f3b968.zip
fedora kernel: cd394142aac30b5c751f25b517572e2448695641v3.6.3-2f17
Signed-off-by: Anton Arapov <anton@redhat.com>
Diffstat (limited to 'kernel/irq/spurious.c')
-rw-r--r--kernel/irq/spurious.c73
1 files changed, 14 insertions, 59 deletions
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index f722eb6f9c4..611cd6003c4 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -18,8 +18,6 @@
static int irqfixup __read_mostly;
-int irq_poll_and_retry = 0;
-
#define POLL_SPURIOUS_IRQ_INTERVAL (HZ/10)
static void poll_spurious_irqs(unsigned long dummy);
static DEFINE_TIMER(poll_spurious_irq_timer, poll_spurious_irqs, 0, 0);
@@ -143,13 +141,12 @@ out:
static void poll_spurious_irqs(unsigned long dummy)
{
struct irq_desc *desc;
- int i, poll_again;
+ int i;
if (atomic_inc_return(&irq_poll_active) != 1)
goto out;
irq_poll_cpu = smp_processor_id();
- poll_again = 0; /* Will stay false as long as no polling candidate is found */
for_each_irq_desc(i, desc) {
unsigned int state;
@@ -162,33 +159,14 @@ static void poll_spurious_irqs(unsigned long dummy)
if (!(state & IRQS_SPURIOUS_DISABLED))
continue;
- /* We end up here with a disabled spurious interrupt.
- desc->irqs_unhandled now tracks the number of times
- the interrupt has been polled */
- if (irq_poll_and_retry) {
- if (desc->irqs_unhandled < 100) { /* 1 second delay with poll frequency 100 Hz */
- local_irq_disable();
- try_one_irq(i, desc, true);
- local_irq_enable();
- desc->irqs_unhandled++;
- poll_again = 1;
- } else {
- irq_enable(desc); /* Reenable the interrupt line */
- desc->depth--;
- desc->istate &= (~IRQS_SPURIOUS_DISABLED);
- desc->irqs_unhandled = 0;
- }
- } else {
- local_irq_disable();
- try_one_irq(i, desc, true);
- local_irq_enable();
- }
+ local_irq_disable();
+ try_one_irq(i, desc, true);
+ local_irq_enable();
}
- if (poll_again)
- mod_timer(&poll_spurious_irq_timer,
- jiffies + POLL_SPURIOUS_IRQ_INTERVAL);
out:
atomic_dec(&irq_poll_active);
+ mod_timer(&poll_spurious_irq_timer,
+ jiffies + POLL_SPURIOUS_IRQ_INTERVAL);
}
static inline int bad_action_ret(irqreturn_t action_ret)
@@ -199,19 +177,11 @@ static inline int bad_action_ret(irqreturn_t action_ret)
}
/*
- * If 9 of the previous 10 interrupts have not been handled
+ * If 99,900 of the previous 100,000 interrupts have not been handled
* then assume that the IRQ is stuck in some manner. Drop a diagnostic
* and try to turn the IRQ off.
*
- * Although this may cause early deactivation of a sporadically
- * malfunctioning IRQ line, the poll system will:
- * a) Poll it for 100 cycles at a 100 Hz rate
- * b) Reenable it afterwards
- *
- * In worst case, with current settings, this will cause short bursts
- * of 10 interrupts every second.
- *
- * (The other single interrupt may have been a correctly
+ * (The other 100-of-100,000 interrupts may have been a correctly
* functioning device sharing an IRQ with the failing one)
*/
static void
@@ -299,8 +269,6 @@ try_misrouted_irq(unsigned int irq, struct irq_desc *desc,
void note_interrupt(unsigned int irq, struct irq_desc *desc,
irqreturn_t action_ret)
{
- int unhandled_thresh = 999000;
-
if (desc->istate & IRQS_POLL_INPROGRESS)
return;
@@ -334,32 +302,19 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc,
}
desc->irq_count++;
- if (!irq_poll_and_retry) {
- if (likely(desc->irq_count < 100000))
- return;
- } else {
- if (likely(desc->irq_count < 10))
- return;
- }
+ if (likely(desc->irq_count < 100000))
+ return;
desc->irq_count = 0;
- if (irq_poll_and_retry)
- unhandled_thresh = 9;
-
- if (unlikely(desc->irqs_unhandled >= unhandled_thresh)) {
+ if (unlikely(desc->irqs_unhandled > 99900)) {
/*
- * The interrupt might be stuck
+ * The interrupt is stuck
*/
- if (!irq_poll_and_retry) {
- __report_bad_irq(irq, desc, action_ret);
- printk(KERN_EMERG "Disabling IRQ %d\n", irq);
- } else {
- printk(KERN_INFO "IRQ %d might be stuck. Polling\n",
- irq);
- }
+ __report_bad_irq(irq, desc, action_ret);
/*
* Now kill the IRQ
*/
+ printk(KERN_EMERG "Disabling IRQ #%d\n", irq);
desc->istate |= IRQS_SPURIOUS_DISABLED;
desc->depth++;
irq_disable(desc);