summaryrefslogtreecommitdiffstats
path: root/kernel/watchdog.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-07-11 16:08:35 +0100
committerGrant Likely <grant.likely@secretlab.ca>2012-07-11 16:08:35 +0100
commit80c1834fc86c2bbacb54a8fc3c04a8b0066b0996 (patch)
tree8200248706960af8b779e9144f5b51c670602228 /kernel/watchdog.c
parent22076c7712be29a602de45b1c573f31adbd428a9 (diff)
parentbd0a521e88aa7a06ae7aabaed7ae196ed4ad867a (diff)
downloadlinux-stable-80c1834fc86c2bbacb54a8fc3c04a8b0066b0996.tar.gz
linux-stable-80c1834fc86c2bbacb54a8fc3c04a8b0066b0996.tar.bz2
linux-stable-80c1834fc86c2bbacb54a8fc3c04a8b0066b0996.zip
Merge tag 'v3.5-rc6' into irqdomain/next
Linux 3.5-rc6
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r--kernel/watchdog.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index e5e1d85b8c7c..4b1dfba70f7c 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -372,6 +372,13 @@ static int watchdog(void *unused)
#ifdef CONFIG_HARDLOCKUP_DETECTOR
+/*
+ * People like the simple clean cpu node info on boot.
+ * Reduce the watchdog noise by only printing messages
+ * that are different from what cpu0 displayed.
+ */
+static unsigned long cpu0_err;
+
static int watchdog_nmi_enable(int cpu)
{
struct perf_event_attr *wd_attr;
@@ -390,11 +397,21 @@ static int watchdog_nmi_enable(int cpu)
/* Try to register using hardware perf events */
event = perf_event_create_kernel_counter(wd_attr, cpu, NULL, watchdog_overflow_callback, NULL);
+
+ /* save cpu0 error for future comparision */
+ if (cpu == 0 && IS_ERR(event))
+ cpu0_err = PTR_ERR(event);
+
if (!IS_ERR(event)) {
- pr_info("enabled, takes one hw-pmu counter.\n");
+ /* only print for cpu0 or different than cpu0 */
+ if (cpu == 0 || cpu0_err)
+ pr_info("enabled on all CPUs, permanently consumes one hw-PMU counter.\n");
goto out_save;
}
+ /* skip displaying the same error again */
+ if (cpu > 0 && (PTR_ERR(event) == cpu0_err))
+ return PTR_ERR(event);
/* vary the KERN level based on the returned errno */
if (PTR_ERR(event) == -EOPNOTSUPP)