All of lore.kernel.org
 help / color / mirror / Atom feed
* x86: use this_cpu for debug_stack_usage
@ 2013-08-06 17:01 Christoph Lameter
  2013-08-06 17:50 ` Steven Rostedt
  0 siblings, 1 reply; 7+ messages in thread
From: Christoph Lameter @ 2013-08-06 17:01 UTC (permalink / raw)
  To: rostedt; +Cc: linux-kernel

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

Signed-off-by: Christoph Lameter <cl@linux.com>

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);

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-06 20:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-06 17:01 x86: use this_cpu for debug_stack_usage Christoph Lameter
2013-08-06 17:50 ` Steven Rostedt
2013-08-06 18:50   ` Christoph Lameter
2013-08-06 18:56   ` Christoph Lameter
2013-08-06 19:02     ` Steven Rostedt
2013-08-06 20:07       ` H. Peter Anvin
2013-08-06 20:11         ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.