From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-core] [PATCH v2 3/5] x86: Clear perfctr_msr on rthal_nmi_release
Date: Tue, 23 Dec 2008 20:06:49 +0100 [thread overview]
Message-ID: <20081223190649.26094.10266.stgit@domain.hid> (raw)
In-Reply-To: <20081223190649.26094.61372.stgit@domain.hid>
Better safe than sorry: Clear all per-CPU perfctr_msr values so that
no one can rearm the NMI watchdog after we released it.
Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
ksrc/arch/x86/nmi_32.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/ksrc/arch/x86/nmi_32.c b/ksrc/arch/x86/nmi_32.c
index 78ba905..69a392a 100644
--- a/ksrc/arch/x86/nmi_32.c
+++ b/ksrc/arch/x86/nmi_32.c
@@ -264,6 +264,7 @@ int rthal_nmi_request(void (*emergency) (struct pt_regs *))
void rthal_nmi_release(void)
{
rthal_nmi_wd_t *wd = &rthal_nmi_wds[rthal_processor_id()];
+ int i;
if (!rthal_linux_nmi_tick)
return;
@@ -276,6 +277,8 @@ void rthal_nmi_release(void)
wrmsr(wd->perfctr_msr, (u32)(0 - RTHAL_CPU_FREQ), 0);
else
wrmsrl(wd->perfctr_msr, 0 - RTHAL_CPU_FREQ);
+ for (i = 0; i < NR_CPUS; i++)
+ rthal_nmi_wds[i].perfctr_msr = 0;
touch_nmi_watchdog();
wmb();
nmi_watchdog_tick = rthal_linux_nmi_tick;
next prev parent reply other threads:[~2008-12-23 19:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-23 19:06 [Xenomai-core] [PATCH v2 0/5] NMI watchdog fixes / enhancements Jan Kiszka
2008-12-23 19:06 ` [Xenomai-core] [PATCH v2 4/5] NMI watchdog support for x86-64 Jan Kiszka
2008-12-23 19:06 ` [Xenomai-core] [PATCH v2 1/5] x86_32: Fix NMI watchdog build for 2.6.27 Jan Kiszka
2008-12-23 19:06 ` [Xenomai-core] [PATCH v2 2/5] Update NMI watchdog for latest Intel CPUs Jan Kiszka
2008-12-23 19:06 ` Jan Kiszka [this message]
2008-12-23 19:06 ` [Xenomai-core] [PATCH v2 5/5] Rework x86 NMI watchdog pass-through Jan Kiszka
2008-12-23 19:21 ` [Xenomai-core] [PATCH v2 0/5] NMI watchdog fixes / enhancements Gilles Chanteperdrix
2008-12-24 0:57 ` Jan Kiszka
2008-12-24 7:25 ` Gilles Chanteperdrix
2008-12-29 14:32 ` Jan Kiszka
2008-12-29 16:36 ` Gilles Chanteperdrix
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=20081223190649.26094.10266.stgit@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=xenomai@xenomai.org \
/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.