]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
x86: Use this_cpu_inc_return for nmi counter
authorTejun Heo <tj@kernel.org>
Sat, 18 Dec 2010 15:30:48 +0000 (16:30 +0100)
committerTejun Heo <tj@kernel.org>
Thu, 30 Dec 2010 11:22:17 +0000 (12:22 +0100)
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>
arch/x86/kernel/apic/nmi.c

index b387dce0b409eae734ae302c89e4dedd27099931..37769cc4fe55ddf5ffd9253416778a62464ed3c0 100644 (file)
@@ -432,8 +432,7 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
                 * Ayiee, looks like this CPU is stuck ...
                 * wait a few IRQs (5 seconds) before doing the oops ...
                 */
-               __this_cpu_inc(alert_counter);
-               if (__this_cpu_read(alert_counter) == 5 * nmi_hz)
+               if (__this_cpu_inc_return(alert_counter) == 5 * nmi_hz)
                        /*
                         * die_nmi will return ONLY if NOTIFY_STOP happens..
                         */