aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-12-18 10:30:48 -0500
committerTejun Heo <tj@kernel.org>2010-12-30 06:22:17 -0500
commitc1955b5f3a95717ce1f5235f6e9968da068e3183 (patch)
treee6ff2d3c733612fe96bc4c7314901bc3bb3650f9 /arch
parent7b543a5334ff4ea2e3ad3b777fc23cdb8072a988 (diff)
x86: Use this_cpu_inc_return for nmi counter
this_cpu_inc_return() saves us a memory access there. Reviewed-by: Pekka Enberg <penberg@kernel.org> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/apic/nmi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c
index b387dce0b409..37769cc4fe55 100644
--- a/arch/x86/kernel/apic/nmi.c
+++ b/arch/x86/kernel/apic/nmi.c
@@ -432,8 +432,7 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
432 * Ayiee, looks like this CPU is stuck ... 432 * Ayiee, looks like this CPU is stuck ...
433 * wait a few IRQs (5 seconds) before doing the oops ... 433 * wait a few IRQs (5 seconds) before doing the oops ...
434 */ 434 */
435 __this_cpu_inc(alert_counter); 435 if (__this_cpu_inc_return(alert_counter) == 5 * nmi_hz)
436 if (__this_cpu_read(alert_counter) == 5 * nmi_hz)
437 /* 436 /*
438 * die_nmi will return ONLY if NOTIFY_STOP happens.. 437 * die_nmi will return ONLY if NOTIFY_STOP happens..
439 */ 438 */