From: Ben Hutchings <ben@decadent.org.uk>
To: Ingo Molnar <mingo@elte.hu>, Don Zickus <dzickus@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>
Cc: linux-kernel@vger.kernel.org, 599368@bugs.debian.org,
608138@bugs.debian.org, Cesare Leonardi <celeonar@gmail.com>
Subject: [PATCH v2] watchdog: Improve initialisation error message and documentation
Date: Sun, 02 Jan 2011 23:02:42 +0000 [thread overview]
Message-ID: <1294009362.3167.126.camel@localhost> (raw)
In-Reply-To: <1294005610.3167.99.camel@localhost>
The error message 'NMI watchdog failed to create perf event...' does
not make it clear that this is a fatal error for the watchdog. It
also currently prints the error value as a pointer, rather than
extracting the error code with PTR_ERR(). Fix that.
Add a note to the description of the 'nowatchdog' kernel parameter to
associate it with this message.
Reported-by: Cesare Leonardi <celeonar@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
Further improved the error message based on Cesare's comments.
Ben.
Documentation/kernel-parameters.txt | 2 +-
kernel/watchdog.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 7d0cead..6fc0cf4 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1764,7 +1764,7 @@ and is between 256 and 4096 characters. It is defined in the file
nousb [USB] Disable the USB subsystem
- nowatchdog [KNL] Disable the lockup detector.
+ nowatchdog [KNL] Disable the lockup detector (NMI watchdog).
nowb [ARM]
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index d74e866..d7ebdf4 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -366,7 +366,8 @@ static int watchdog_nmi_enable(int cpu)
goto out_save;
}
- printk(KERN_ERR "NMI watchdog failed to create perf event on cpu%i: %p\n", cpu, event);
+ printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n",
+ cpu, PTR_ERR(event));
return PTR_ERR(event);
/* success path */
--
1.7.2.3
next prev parent reply other threads:[~2011-01-02 23:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-02 22:00 [PATCH] watchdog: Improve failure message and documentation Ben Hutchings
2011-01-02 23:02 ` Ben Hutchings [this message]
2011-01-03 13:56 ` [PATCH v2] watchdog: Improve initialisation error " Don Zickus
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=1294009362.3167.126.camel@localhost \
--to=ben@decadent.org.uk \
--cc=599368@bugs.debian.org \
--cc=608138@bugs.debian.org \
--cc=celeonar@gmail.com \
--cc=dzickus@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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 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.