From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <andi@firstfloor.org>,
"Udo A. Steinberg" <us15@os.inf.tu-dresden.de>,
Michal Piotrowski <michal.k.k.piotrowski@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
ak@suse.de
Subject: Re: [PATCH 2/2] i386: Use the right wrapper to disable the NMI watchdog
Date: Fri, 8 Jun 2007 20:50:12 +0200 [thread overview]
Message-ID: <20070608185012.GC2204@atjola.homenet> (raw)
In-Reply-To: <20070608184422.GA2204@atjola.homenet>
When disabled through /proc/sys/kernel/nmi_watchdog, the NMI watchdog
uses the stop() method directly, which does not decrement the activity
counter, leading to a BUG(). Use the wrapper function instead to fix
that.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
---
diff --git a/arch/i386/kernel/cpu/perfctr-watchdog.c b/arch/i386/kernel/cpu/perfctr-watchdog.c
index 2b04c8f..f0b6763 100644
--- a/arch/i386/kernel/cpu/perfctr-watchdog.c
+++ b/arch/i386/kernel/cpu/perfctr-watchdog.c
@@ -28,7 +28,7 @@ struct wd_ops {
void (*unreserve)(void);
int (*setup)(unsigned nmi_hz);
void (*rearm)(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz);
- void (*stop)(void *);
+ void (*stop)(void);
unsigned perfctr;
unsigned evntsel;
u64 checkbit;
@@ -142,7 +142,7 @@ void disable_lapic_nmi_watchdog(void)
if (atomic_read(&nmi_active) <= 0)
return;
- on_each_cpu(wd_ops->stop, NULL, 0, 1);
+ on_each_cpu(stop_apic_nmi_watchdog, NULL, 0, 1);
wd_ops->unreserve();
BUG_ON(atomic_read(&nmi_active) != 0);
@@ -255,7 +255,7 @@ static int setup_k7_watchdog(unsigned nmi_hz)
return 1;
}
-static void single_msr_stop_watchdog(void *arg)
+static void single_msr_stop_watchdog(void)
{
struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk);
@@ -442,7 +442,7 @@ static int setup_p4_watchdog(unsigned nmi_hz)
return 1;
}
-static void stop_p4_watchdog(void *arg)
+static void stop_p4_watchdog(void)
{
struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk);
wrmsr(wd->cccr_msr, 0, 0);
@@ -628,7 +634,7 @@ int lapic_watchdog_init(unsigned nmi_hz)
void lapic_watchdog_stop(void)
{
if (wd_ops)
- wd_ops->stop(NULL);
+ wd_ops->stop();
}
unsigned lapic_adjust_nmi_hz(unsigned hz)
next prev parent reply other threads:[~2007-06-08 18:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-29 12:52 [1/4] 2.6.22-rc3: known regressions Michal Piotrowski
2007-05-29 14:34 ` Jan Kara
2007-05-29 14:41 ` Florin Iucha
2007-05-30 4:35 ` Sam Ravnborg
2007-06-03 13:02 ` Udo A. Steinberg
2007-06-08 6:02 ` [PATCH] Fix interchanged parameters to release_{evntsel,perfctr}_nmi Björn Steinbrink
2007-06-08 6:41 ` Andrew Morton
2007-06-08 10:58 ` Ingo Molnar
2007-06-08 18:44 ` [PATCH 0/2] i386: Fix two more NMI watchdog bugs Björn Steinbrink
2007-06-08 18:46 ` [PATCH 1/2] i386: Fix NMI watchdog not reserving its MSRs Björn Steinbrink
2007-06-08 18:50 ` Björn Steinbrink [this message]
2007-06-08 20:43 ` [PATCH 0/2] i386: Fix two more NMI watchdog bugs Ingo Molnar
2007-06-08 20:49 ` Udo A. Steinberg
2007-06-08 20:57 ` Andrew Morton
2007-06-08 21:13 ` Udo A. Steinberg
2007-06-08 22:28 ` Andi Kleen
2007-06-09 2:27 ` [PATCH] i386: Fix the K7 NMI watchdog checkbit Björn Steinbrink
2007-06-09 2:33 ` Björn Steinbrink
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=20070608185012.GC2204@atjola.homenet \
--to=b.steinbrink@gmx.de \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.k.k.piotrowski@gmail.com \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
--cc=us15@os.inf.tu-dresden.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
all inboxes | Powered by JetHome®