i386: use the right wrapper to disable the NMI watchdog

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>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Björn Steinbrink and committed by Linus Torvalds 54c6ed75 faa4cfa6

+5 -5
+5 -5
arch/i386/kernel/cpu/perfctr-watchdog.c
··· 28 28 void (*unreserve)(void); 29 29 int (*setup)(unsigned nmi_hz); 30 30 void (*rearm)(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz); 31 - void (*stop)(void *); 31 + void (*stop)(void); 32 32 unsigned perfctr; 33 33 unsigned evntsel; 34 34 u64 checkbit; ··· 142 142 if (atomic_read(&nmi_active) <= 0) 143 143 return; 144 144 145 - on_each_cpu(wd_ops->stop, NULL, 0, 1); 145 + on_each_cpu(stop_apic_nmi_watchdog, NULL, 0, 1); 146 146 wd_ops->unreserve(); 147 147 148 148 BUG_ON(atomic_read(&nmi_active) != 0); ··· 255 255 return 1; 256 256 } 257 257 258 - static void single_msr_stop_watchdog(void *arg) 258 + static void single_msr_stop_watchdog(void) 259 259 { 260 260 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); 261 261 ··· 442 442 return 1; 443 443 } 444 444 445 - static void stop_p4_watchdog(void *arg) 445 + static void stop_p4_watchdog(void) 446 446 { 447 447 struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); 448 448 wrmsr(wd->cccr_msr, 0, 0); ··· 634 634 void lapic_watchdog_stop(void) 635 635 { 636 636 if (wd_ops) 637 - wd_ops->stop(NULL); 637 + wd_ops->stop(); 638 638 } 639 639 640 640 unsigned lapic_adjust_nmi_hz(unsigned hz)