Commit da88ba17 authored by Björn Steinbrink's avatar Björn Steinbrink Committed by Linus Torvalds

perfctr-watchdog: fix interchanged parameters to release_{evntsel,perfctr}_nmi

Fix oops triggered during: echo 0 > /proc/sys/kernel/nmi_watchdog

The culprit seems to be 09198e68:
[PATCH] i386: Clean up NMI watchdog code

In two places, the parameters to release_{evntsel,perfctr}_nmi
got interchanged during the cleanup.

Fix interchanged parameters to release_{evntsel,perfctr}_nmi.
Signed-off-by: default avatarBjörn Steinbrink <B.Steinbrink@gmx.de>
Cc: Stephane Eranian <eranian@hpl.hp.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2f41dddb
...@@ -276,8 +276,8 @@ static int single_msr_reserve(void) ...@@ -276,8 +276,8 @@ static int single_msr_reserve(void)
static void single_msr_unreserve(void) static void single_msr_unreserve(void)
{ {
release_evntsel_nmi(wd_ops->perfctr); release_evntsel_nmi(wd_ops->evntsel);
release_perfctr_nmi(wd_ops->evntsel); release_perfctr_nmi(wd_ops->perfctr);
} }
static void single_msr_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz) static void single_msr_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz)
...@@ -475,10 +475,10 @@ static void p4_unreserve(void) ...@@ -475,10 +475,10 @@ static void p4_unreserve(void)
{ {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (smp_num_siblings > 1) if (smp_num_siblings > 1)
release_evntsel_nmi(MSR_P4_IQ_PERFCTR1); release_perfctr_nmi(MSR_P4_IQ_PERFCTR1);
#endif #endif
release_evntsel_nmi(MSR_P4_IQ_PERFCTR0); release_evntsel_nmi(MSR_P4_CRU_ESCR0);
release_perfctr_nmi(MSR_P4_CRU_ESCR0); release_perfctr_nmi(MSR_P4_IQ_PERFCTR0);
} }
static void p4_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz) static void p4_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment