aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/kernel/irq.c4
-rw-r--r--kernel/irq/spurious.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index bcc19fbb32df..ec20f8935e8b 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -52,7 +52,7 @@
52 */ 52 */
53#define MAX_IRQ_CNT 100000 53#define MAX_IRQ_CNT 100000
54 54
55static int noirqdebug; 55static int noirqdebug __read_mostly;
56static volatile unsigned long irq_err_count; 56static volatile unsigned long irq_err_count;
57static DEFINE_SPINLOCK(irq_controller_lock); 57static DEFINE_SPINLOCK(irq_controller_lock);
58static LIST_HEAD(irq_pending); 58static LIST_HEAD(irq_pending);
@@ -81,7 +81,7 @@ irqreturn_t no_action(int irq, void *dev_id, struct pt_regs *regs)
81 81
82void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 82void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
83{ 83{
84 irq_err_count += 1; 84 irq_err_count++;
85 printk(KERN_ERR "IRQ: spurious interrupt %d\n", irq); 85 printk(KERN_ERR "IRQ: spurious interrupt %d\n", irq);
86} 86}
87 87
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index 7df9abd5ec86..b2fb3c18d06b 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -11,7 +11,7 @@
11#include <linux/kallsyms.h> 11#include <linux/kallsyms.h>
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13 13
14static int irqfixup; 14static int irqfixup __read_mostly;
15 15
16/* 16/*
17 * Recovery handler for misrouted interrupts. 17 * Recovery handler for misrouted interrupts.
@@ -136,9 +136,9 @@ static void report_bad_irq(unsigned int irq, irq_desc_t *desc, irqreturn_t actio
136void note_interrupt(unsigned int irq, irq_desc_t *desc, irqreturn_t action_ret, 136void note_interrupt(unsigned int irq, irq_desc_t *desc, irqreturn_t action_ret,
137 struct pt_regs *regs) 137 struct pt_regs *regs)
138{ 138{
139 if (action_ret != IRQ_HANDLED) { 139 if (unlikely(action_ret != IRQ_HANDLED)) {
140 desc->irqs_unhandled++; 140 desc->irqs_unhandled++;
141 if (action_ret != IRQ_NONE) 141 if (unlikely(action_ret != IRQ_NONE))
142 report_bad_irq(irq, desc, action_ret); 142 report_bad_irq(irq, desc, action_ret);
143 } 143 }
144 144
@@ -152,11 +152,11 @@ void note_interrupt(unsigned int irq, irq_desc_t *desc, irqreturn_t action_ret,
152 } 152 }
153 153
154 desc->irq_count++; 154 desc->irq_count++;
155 if (desc->irq_count < 100000) 155 if (likely(desc->irq_count < 100000))
156 return; 156 return;
157 157
158 desc->irq_count = 0; 158 desc->irq_count = 0;
159 if (desc->irqs_unhandled > 99900) { 159 if (unlikely(desc->irqs_unhandled > 99900)) {
160 /* 160 /*
161 * The interrupt is stuck 161 * The interrupt is stuck
162 */ 162 */
@@ -171,7 +171,7 @@ void note_interrupt(unsigned int irq, irq_desc_t *desc, irqreturn_t action_ret,
171 desc->irqs_unhandled = 0; 171 desc->irqs_unhandled = 0;
172} 172}
173 173
174int noirqdebug; 174int noirqdebug __read_mostly;
175 175
176int __init noirqdebug_setup(char *str) 176int __init noirqdebug_setup(char *str)
177{ 177{