diff options
author | Cyrill Gorcunov <gorcunov@openvz.org> | 2009-04-12 12:47:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-12 13:23:52 -0400 |
commit | edea7148a87c099e5d5d4838285cc27e459588b7 (patch) | |
tree | 1e6fa151fce6b97efe8a750f15514c457b62c30f /arch/x86/kernel/irq.c | |
parent | 47f16ca7631f9c6bad8e6d968cfb1433029b09ec (diff) |
x86: irq.c - tiny cleanup
Impact: cleanup, robustization
1) guard ack_bad_irq with printk_ratelimit since there is no
guarantee we will not be flooded one day
2) use pr_emerg() helper
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
LKML-Reference: <20090412165058.277579847@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/irq.c')
-rw-r--r-- | arch/x86/kernel/irq.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 3aaf7b9e3a8b..6603492e8b71 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
@@ -24,7 +24,8 @@ void (*generic_interrupt_extension)(void) = NULL; | |||
24 | */ | 24 | */ |
25 | void ack_bad_irq(unsigned int irq) | 25 | void ack_bad_irq(unsigned int irq) |
26 | { | 26 | { |
27 | printk(KERN_ERR "unexpected IRQ trap at vector %02x\n", irq); | 27 | if (printk_ratelimit()) |
28 | pr_err("unexpected IRQ trap at vector %02x\n", irq); | ||
28 | 29 | ||
29 | #ifdef CONFIG_X86_LOCAL_APIC | 30 | #ifdef CONFIG_X86_LOCAL_APIC |
30 | /* | 31 | /* |
@@ -178,7 +179,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu) | |||
178 | sum += irq_stats(cpu)->irq_thermal_count; | 179 | sum += irq_stats(cpu)->irq_thermal_count; |
179 | # ifdef CONFIG_X86_64 | 180 | # ifdef CONFIG_X86_64 |
180 | sum += irq_stats(cpu)->irq_threshold_count; | 181 | sum += irq_stats(cpu)->irq_threshold_count; |
181 | #endif | 182 | # endif |
182 | #endif | 183 | #endif |
183 | return sum; | 184 | return sum; |
184 | } | 185 | } |
@@ -219,8 +220,8 @@ unsigned int __irq_entry do_IRQ(struct pt_regs *regs) | |||
219 | #endif | 220 | #endif |
220 | 221 | ||
221 | if (printk_ratelimit()) | 222 | if (printk_ratelimit()) |
222 | printk(KERN_EMERG "%s: %d.%d No irq handler for vector (irq %d)\n", | 223 | pr_emerg("%s: %d.%d No irq handler for vector (irq %d)\n", |
223 | __func__, smp_processor_id(), vector, irq); | 224 | __func__, smp_processor_id(), vector, irq); |
224 | } | 225 | } |
225 | 226 | ||
226 | irq_exit(); | 227 | irq_exit(); |