Commit 28b4e0d8 authored by Tejun Heo's avatar Tejun Heo Committed by Ingo Molnar

x86: Rename global percpu symbol dr7 to cpu_dr7

Percpu symbols now occupy the same namespace as other global
symbols and as such short global symbols without subsystem
prefix tend to collide with local variables.  dr7 percpu
variable used by x86 was hit by this. Rename it to cpu_dr7.

The rename also makes it more consistent with its fellow
cpu_debugreg percpu variable.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <20091125115856.GA17856@elte.hu>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
parent 99df5a6a
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
*/ */
#ifdef __KERNEL__ #ifdef __KERNEL__
DECLARE_PER_CPU(unsigned long, dr7); DECLARE_PER_CPU(unsigned long, cpu_dr7);
static inline void hw_breakpoint_disable(void) static inline void hw_breakpoint_disable(void)
{ {
...@@ -91,7 +91,7 @@ static inline void hw_breakpoint_disable(void) ...@@ -91,7 +91,7 @@ static inline void hw_breakpoint_disable(void)
static inline int hw_breakpoint_active(void) static inline int hw_breakpoint_active(void)
{ {
return __get_cpu_var(dr7) & DR_GLOBAL_ENABLE_MASK; return __get_cpu_var(cpu_dr7) & DR_GLOBAL_ENABLE_MASK;
} }
extern void aout_dump_debugregs(struct user *dump); extern void aout_dump_debugregs(struct user *dump);
......
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
#include <asm/debugreg.h> #include <asm/debugreg.h>
/* Per cpu debug control register value */ /* Per cpu debug control register value */
DEFINE_PER_CPU(unsigned long, dr7); DEFINE_PER_CPU(unsigned long, cpu_dr7);
EXPORT_PER_CPU_SYMBOL(dr7); EXPORT_PER_CPU_SYMBOL(cpu_dr7);
/* Per cpu debug address registers values */ /* Per cpu debug address registers values */
static DEFINE_PER_CPU(unsigned long, cpu_debugreg[HBP_NUM]); static DEFINE_PER_CPU(unsigned long, cpu_debugreg[HBP_NUM]);
...@@ -118,7 +118,7 @@ int arch_install_hw_breakpoint(struct perf_event *bp) ...@@ -118,7 +118,7 @@ int arch_install_hw_breakpoint(struct perf_event *bp)
set_debugreg(info->address, i); set_debugreg(info->address, i);
__get_cpu_var(cpu_debugreg[i]) = info->address; __get_cpu_var(cpu_debugreg[i]) = info->address;
dr7 = &__get_cpu_var(dr7); dr7 = &__get_cpu_var(cpu_dr7);
*dr7 |= encode_dr7(i, info->len, info->type); *dr7 |= encode_dr7(i, info->len, info->type);
set_debugreg(*dr7, 7); set_debugreg(*dr7, 7);
...@@ -153,7 +153,7 @@ void arch_uninstall_hw_breakpoint(struct perf_event *bp) ...@@ -153,7 +153,7 @@ void arch_uninstall_hw_breakpoint(struct perf_event *bp)
if (WARN_ONCE(i == HBP_NUM, "Can't find any breakpoint slot")) if (WARN_ONCE(i == HBP_NUM, "Can't find any breakpoint slot"))
return; return;
dr7 = &__get_cpu_var(dr7); dr7 = &__get_cpu_var(cpu_dr7);
*dr7 &= ~encode_dr7(i, info->len, info->type); *dr7 &= ~encode_dr7(i, info->len, info->type);
set_debugreg(*dr7, 7); set_debugreg(*dr7, 7);
...@@ -437,7 +437,7 @@ void hw_breakpoint_restore(void) ...@@ -437,7 +437,7 @@ void hw_breakpoint_restore(void)
set_debugreg(__get_cpu_var(cpu_debugreg[2]), 2); set_debugreg(__get_cpu_var(cpu_debugreg[2]), 2);
set_debugreg(__get_cpu_var(cpu_debugreg[3]), 3); set_debugreg(__get_cpu_var(cpu_debugreg[3]), 3);
set_debugreg(current->thread.debugreg6, 6); set_debugreg(current->thread.debugreg6, 6);
set_debugreg(__get_cpu_var(dr7), 7); set_debugreg(__get_cpu_var(cpu_dr7), 7);
} }
EXPORT_SYMBOL_GPL(hw_breakpoint_restore); EXPORT_SYMBOL_GPL(hw_breakpoint_restore);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment