Commit 9f51e24e authored by Marcin Slusarz's avatar Marcin Slusarz Committed by Ingo Molnar

x86: Use printk_once()

Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
LKML-Reference: <1249847649-11631-6-git-send-email-marcin.slusarz@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 8bdbd962
...@@ -218,7 +218,6 @@ bool handle_irq(unsigned irq, struct pt_regs *regs) ...@@ -218,7 +218,6 @@ bool handle_irq(unsigned irq, struct pt_regs *regs)
void fixup_irqs(void) void fixup_irqs(void)
{ {
unsigned int irq; unsigned int irq;
static int warned;
struct irq_desc *desc; struct irq_desc *desc;
for_each_irq_desc(irq, desc) { for_each_irq_desc(irq, desc) {
...@@ -236,8 +235,8 @@ void fixup_irqs(void) ...@@ -236,8 +235,8 @@ void fixup_irqs(void)
} }
if (desc->chip->set_affinity) if (desc->chip->set_affinity)
desc->chip->set_affinity(irq, affinity); desc->chip->set_affinity(irq, affinity);
else if (desc->action && !(warned++)) else if (desc->action)
printk("Cannot set affinity for irq %i\n", irq); printk_once("Cannot set affinity for irq %i\n", irq);
} }
#if 0 #if 0
......
...@@ -2261,12 +2261,7 @@ static int emulator_cmpxchg_emulated(unsigned long addr, ...@@ -2261,12 +2261,7 @@ static int emulator_cmpxchg_emulated(unsigned long addr,
unsigned int bytes, unsigned int bytes,
struct kvm_vcpu *vcpu) struct kvm_vcpu *vcpu)
{ {
static int reported; printk_once(KERN_WARNING "kvm: emulating exchange as write\n");
if (!reported) {
reported = 1;
printk(KERN_WARNING "kvm: emulating exchange as write\n");
}
#ifndef CONFIG_X86_64 #ifndef CONFIG_X86_64
/* guests cmpxchg8b have to be emulated atomically */ /* guests cmpxchg8b have to be emulated atomically */
if (bytes == 8) { if (bytes == 8) {
......
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