Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1526895

[PATCH] kernel/watchdog.c: Only output hw-PMU message once

From Prarit Bhargava <prarit@redhat.com>
Newsgroups linux.kernel
Subject [PATCH] kernel/watchdog.c: Only output hw-PMU message once
Date 2016-11-21 17:40 +0100
Message-ID <sFZNo-3C2-49@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


When CONFIG_BOOTPARAM_HOTPLUG_CPU0 is enabled, the socket containing the
boot cpu can be replaced.  During the hot add event, the message

NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.

is output implying that the NMI was disabled at some point.  This is not the
case and the message has caused confusion for users of systems that support
socket removal.

This patch modifies the message so that it only outputs a single time
during runtime.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Joshua Hunt <johunt@akamai.com>
Cc: Ingo Molnar <mingo@kernel.org>
---
 kernel/watchdog.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 9acb29f280ec..560414692c01 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -615,7 +615,7 @@ static int watchdog_nmi_enable(unsigned int cpu)
 	if (!IS_ERR(event)) {
 		/* 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");
+			pr_info_once("enabled on all CPUs, permanently consumes one hw-PMU counter.\n");
 		goto out_save;
 	}
 
-- 
1.7.9.3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] kernel/watchdog.c: Only output hw-PMU message once Prarit Bhargava <prarit@redhat.com> - 2016-11-21 17:40 +0100
  Re: [PATCH] kernel/watchdog.c: Only output hw-PMU message once Don Zickus <dzickus@redhat.com> - 2016-11-21 18:50 +0100
    Re: [PATCH] kernel/watchdog.c: Only output hw-PMU message once Prarit Bhargava <prarit@redhat.com> - 2016-11-21 19:00 +0100

csiph-web