Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169787
b: refs/heads/master
c: 28b4e0d
h: refs/heads/master
i:
  169785: 81ea86a
  169783: b7cdc55
v: v3
  • Loading branch information
Tejun Heo authored and Ingo Molnar committed Nov 25, 2009
1 parent 285c926 commit cf27442
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99df5a6a215f026e62287083de2b44b22edd3623
refs/heads/master: 28b4e0d86acf59ae3bc422921138a4958458326e
4 changes: 2 additions & 2 deletions trunk/arch/x86/include/asm/debugreg.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
*/
#ifdef __KERNEL__

DECLARE_PER_CPU(unsigned long, dr7);
DECLARE_PER_CPU(unsigned long, cpu_dr7);

static inline void hw_breakpoint_disable(void)
{
Expand All @@ -91,7 +91,7 @@ static inline void hw_breakpoint_disable(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);
Expand Down
10 changes: 5 additions & 5 deletions trunk/arch/x86/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
#include <asm/debugreg.h>

/* Per cpu debug control register value */
DEFINE_PER_CPU(unsigned long, dr7);
EXPORT_PER_CPU_SYMBOL(dr7);
DEFINE_PER_CPU(unsigned long, cpu_dr7);
EXPORT_PER_CPU_SYMBOL(cpu_dr7);

/* Per cpu debug address registers values */
static DEFINE_PER_CPU(unsigned long, cpu_debugreg[HBP_NUM]);
Expand Down Expand Up @@ -118,7 +118,7 @@ int arch_install_hw_breakpoint(struct perf_event *bp)
set_debugreg(info->address, i);
__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);

set_debugreg(*dr7, 7);
Expand Down Expand Up @@ -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"))
return;

dr7 = &__get_cpu_var(dr7);
dr7 = &__get_cpu_var(cpu_dr7);
*dr7 &= ~encode_dr7(i, info->len, info->type);

set_debugreg(*dr7, 7);
Expand Down Expand Up @@ -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[3]), 3);
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);

Expand Down

0 comments on commit cf27442

Please sign in to comment.