All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog, nmi: lower the severity of error messages
@ 2011-02-09 19:02 Don Zickus
  2011-02-10 14:42 ` [tip:perf/urgent] watchdog, nmi: Lower " tip-bot for Don Zickus
  0 siblings, 1 reply; 2+ messages in thread
From: Don Zickus @ 2011-02-09 19:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, LKML, pebolle, Don Zickus

During boot if the hardlockup detector fails to initialize, it
complains very loudly.  Some failures should be expected under
certain situations, ie no lapics, or resource in-use.  Tone those
error messages down a bit.  Keep the rest at a high level.

Reported-by: Paul Bolle <pebolle@tiscali.nl>
Tested-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Don Zickus <dzickus@redhat.com>
---
 kernel/watchdog.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index d7ebdf4..bb7887b 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -366,8 +366,17 @@ static int watchdog_nmi_enable(int cpu)
 		goto out_save;
 	}
 
-	printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n",
-	       cpu, PTR_ERR(event));
+
+	/* vary the KERN level based on the returned errno */
+	if (PTR_ERR(event) == -EOPNOTSUPP)
+		printk(KERN_INFO "NMI watchdog disabled (cpu%i): not supported"
+				 " (no LAPIC?)\n", cpu);
+	else if (PTR_ERR(event) == -ENOENT)
+		printk(KERN_WARNING "NMI watchdog disabled (cpu%i): hardware"
+				    " events not enabled\n", cpu);
+	else
+		printk(KERN_ERR "NMI watchdog disabled (cpu%i): unable to create"
+				" perf event: %ld\n", cpu, PTR_ERR(event));
 	return PTR_ERR(event);
 
 	/* success path */
-- 
1.7.3.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip:perf/urgent] watchdog, nmi: Lower the severity of error messages
  2011-02-09 19:02 [PATCH] watchdog, nmi: lower the severity of error messages Don Zickus
@ 2011-02-10 14:42 ` tip-bot for Don Zickus
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Don Zickus @ 2011-02-10 14:42 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, peterz, pebolle, tglx, dzickus, mingo

Commit-ID:  5651f7f47dbb1cf2b95a60582546db4ff508e2b4
Gitweb:     http://git.kernel.org/tip/5651f7f47dbb1cf2b95a60582546db4ff508e2b4
Author:     Don Zickus <dzickus@redhat.com>
AuthorDate: Wed, 9 Feb 2011 14:02:33 -0500
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 10 Feb 2011 13:21:59 +0100

watchdog, nmi: Lower the severity of error messages

During boot if the hardlockup detector fails to initialize, it
complains very loudly.  Some failures should be expected under
certain situations, ie no lapics, or resource in-use.  Tone
those error messages down a bit.  Keep the rest at a high level.

Reported-by: Paul Bolle <pebolle@tiscali.nl>
Tested-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1297278153-21111-1-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/watchdog.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index f37f974..18bb157 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -363,8 +363,14 @@ static int watchdog_nmi_enable(int cpu)
 		goto out_save;
 	}
 
-	printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n",
-	       cpu, PTR_ERR(event));
+
+	/* vary the KERN level based on the returned errno */
+	if (PTR_ERR(event) == -EOPNOTSUPP)
+		printk(KERN_INFO "NMI watchdog disabled (cpu%i): not supported (no LAPIC?)\n", cpu);
+	else if (PTR_ERR(event) == -ENOENT)
+		printk(KERN_WARNING "NMI watchdog disabled (cpu%i): hardware events not enabled\n", cpu);
+	else
+		printk(KERN_ERR "NMI watchdog disabled (cpu%i): unable to create perf event: %ld\n", cpu, PTR_ERR(event));
 	return PTR_ERR(event);
 
 	/* success path */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-10 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-09 19:02 [PATCH] watchdog, nmi: lower the severity of error messages Don Zickus
2011-02-10 14:42 ` [tip:perf/urgent] watchdog, nmi: Lower " tip-bot for Don Zickus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.