public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Cyrill Gorcunov <gorcunov@openvz.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	gorcunov@openvz.org, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:x86/apic] x86: irq.c - tiny cleanup
Date: Sun, 12 Apr 2009 17:57:34 GMT	[thread overview]
Message-ID: <tip-edea7148a87c099e5d5d4838285cc27e459588b7@git.kernel.org> (raw)
In-Reply-To: <20090412165058.277579847@openvz.org>

Commit-ID:  edea7148a87c099e5d5d4838285cc27e459588b7
Gitweb:     http://git.kernel.org/tip/edea7148a87c099e5d5d4838285cc27e459588b7
Author:     Cyrill Gorcunov <gorcunov@openvz.org>
AuthorDate: Sun, 12 Apr 2009 20:47:39 +0400
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 12 Apr 2009 19:23:52 +0200

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>


---
 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 3aaf7b9..6603492 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -24,7 +24,8 @@ void (*generic_interrupt_extension)(void) = NULL;
  */
 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
 	/*
@@ -178,7 +179,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
 	sum += irq_stats(cpu)->irq_thermal_count;
 # ifdef CONFIG_X86_64
 	sum += irq_stats(cpu)->irq_threshold_count;
-#endif
+# endif
 #endif
 	return sum;
 }
@@ -219,8 +220,8 @@ unsigned int __irq_entry do_IRQ(struct pt_regs *regs)
 #endif
 
 		if (printk_ratelimit())
-			printk(KERN_EMERG "%s: %d.%d No irq handler for vector (irq %d)\n",
-			       __func__, smp_processor_id(), vector, irq);
+			pr_emerg("%s: %d.%d No irq handler for vector (irq %d)\n",
+				__func__, smp_processor_id(), vector, irq);
 	}
 
 	irq_exit();

  parent reply	other threads:[~2009-04-12 17:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-12 16:47 [rfc 0/4] x86 - apic dummy ops with cleanups Cyrill Gorcunov
2009-04-12 16:47 ` [rfc 1/4] x86: irq.c - tiny cleanup Cyrill Gorcunov
2009-04-12 17:25   ` Ingo Molnar
2009-04-12 17:53     ` Cyrill Gorcunov
2009-04-12 17:57   ` tip-bot for Cyrill Gorcunov [this message]
2009-04-12 16:47 ` [rfc 2/4] x86: apic - introduce imcr_ helpers Cyrill Gorcunov
2009-04-12 17:57   ` [tip:x86/apic] " tip-bot for Cyrill Gorcunov
2009-04-12 16:47 ` [rfc 3/4] x86: apic - introduce dummy apic operations Cyrill Gorcunov
2009-04-12 17:57   ` [tip:x86/apic] " tip-bot for Cyrill Gorcunov
2009-04-12 16:47 ` [rfc 4/4] x86: smp.c - align smp_ops assignments Cyrill Gorcunov
2009-04-12 17:58   ` [tip:x86/apic] " tip-bot for Cyrill Gorcunov
2009-04-12 17:24 ` [rfc 0/4] x86 - apic dummy ops with cleanups Ingo Molnar
2009-04-12 18:00   ` Cyrill Gorcunov
2009-04-12 18:02     ` Ingo Molnar
2009-04-12 18:12       ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-edea7148a87c099e5d5d4838285cc27e459588b7@git.kernel.org \
    --to=gorcunov@openvz.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox