Commit edea7148 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Ingo Molnar

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: default avatarCyrill Gorcunov <gorcunov@openvz.org>
LKML-Reference: <20090412165058.277579847@openvz.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 47f16ca7
...@@ -24,7 +24,8 @@ void (*generic_interrupt_extension)(void) = NULL; ...@@ -24,7 +24,8 @@ void (*generic_interrupt_extension)(void) = NULL;
*/ */
void ack_bad_irq(unsigned int irq) void ack_bad_irq(unsigned int irq)
{ {
printk(KERN_ERR "unexpected IRQ trap at vector %02x\n", irq); if (printk_ratelimit())
pr_err("unexpected IRQ trap at vector %02x\n", irq);
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
/* /*
...@@ -178,7 +179,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu) ...@@ -178,7 +179,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
sum += irq_stats(cpu)->irq_thermal_count; sum += irq_stats(cpu)->irq_thermal_count;
# ifdef CONFIG_X86_64 # ifdef CONFIG_X86_64
sum += irq_stats(cpu)->irq_threshold_count; sum += irq_stats(cpu)->irq_threshold_count;
#endif # endif
#endif #endif
return sum; return sum;
} }
...@@ -219,8 +220,8 @@ unsigned int __irq_entry do_IRQ(struct pt_regs *regs) ...@@ -219,8 +220,8 @@ unsigned int __irq_entry do_IRQ(struct pt_regs *regs)
#endif #endif
if (printk_ratelimit()) if (printk_ratelimit())
printk(KERN_EMERG "%s: %d.%d No irq handler for vector (irq %d)\n", pr_emerg("%s: %d.%d No irq handler for vector (irq %d)\n",
__func__, smp_processor_id(), vector, irq); __func__, smp_processor_id(), vector, irq);
} }
irq_exit(); irq_exit();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment