x86: use this_cpu for debug_stack_usage

From: Christoph Lameter
Date: Tue Aug 06 2013 - 13:14:34 EST


Reduces overhead a bit and frees up a couple of registers.

Signed-off-by: Christoph Lameter <cl@xxxxxxxxx>

Index: linux/arch/x86/include/asm/debugreg.h
===================================================================
--- linux.orig/arch/x86/include/asm/debugreg.h 2013-07-30 14:00:30.000000000 -0500
+++ linux/arch/x86/include/asm/debugreg.h 2013-07-30 14:00:57.503076270 -0500
@@ -97,11 +97,11 @@ extern void hw_breakpoint_restore(void);
DECLARE_PER_CPU(int, debug_stack_usage);
static inline void debug_stack_usage_inc(void)
{
- __get_cpu_var(debug_stack_usage)++;
+ __this_cpu_inc(debug_stack_usage);
}
static inline void debug_stack_usage_dec(void)
{
- __get_cpu_var(debug_stack_usage)--;
+ __this_cpu_dec(debug_stack_usage);
}
int is_debug_stack(unsigned long addr);
void debug_stack_set_zero(void);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/