aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/debugreg.h2
-rw-r--r--arch/x86/kernel/hw_breakpoint.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/include/asm/debugreg.h b/arch/x86/include/asm/debugreg.h
index 0f6e92af4227..fdabd8435765 100644
--- a/arch/x86/include/asm/debugreg.h
+++ b/arch/x86/include/asm/debugreg.h
@@ -96,9 +96,7 @@ static inline int hw_breakpoint_active(void)
96 96
97extern void aout_dump_debugregs(struct user *dump); 97extern void aout_dump_debugregs(struct user *dump);
98 98
99#ifdef CONFIG_KVM
100extern void hw_breakpoint_restore(void); 99extern void hw_breakpoint_restore(void);
101#endif
102 100
103#endif /* __KERNEL__ */ 101#endif /* __KERNEL__ */
104 102
diff --git a/arch/x86/kernel/hw_breakpoint.c b/arch/x86/kernel/hw_breakpoint.c
index 57dcee5fa958..752daebe91c6 100644
--- a/arch/x86/kernel/hw_breakpoint.c
+++ b/arch/x86/kernel/hw_breakpoint.c
@@ -43,6 +43,7 @@
43 43
44/* Per cpu debug control register value */ 44/* Per cpu debug control register value */
45DEFINE_PER_CPU(unsigned long, dr7); 45DEFINE_PER_CPU(unsigned long, dr7);
46EXPORT_PER_CPU_SYMBOL(dr7);
46 47
47/* Per cpu debug address registers values */ 48/* Per cpu debug address registers values */
48static DEFINE_PER_CPU(unsigned long, cpu_debugreg[HBP_NUM]); 49static DEFINE_PER_CPU(unsigned long, cpu_debugreg[HBP_NUM]);
@@ -409,6 +410,7 @@ void aout_dump_debugregs(struct user *dump)
409 410
410 dump->u_debugreg[7] = dr7; 411 dump->u_debugreg[7] = dr7;
411} 412}
413EXPORT_SYMBOL_GPL(aout_dump_debugregs);
412 414
413/* 415/*
414 * Release the user breakpoints used by ptrace 416 * Release the user breakpoints used by ptrace
@@ -424,7 +426,6 @@ void flush_ptrace_hw_breakpoint(struct task_struct *tsk)
424 } 426 }
425} 427}
426 428
427#ifdef CONFIG_KVM
428void hw_breakpoint_restore(void) 429void hw_breakpoint_restore(void)
429{ 430{
430 set_debugreg(__get_cpu_var(cpu_debugreg[0]), 0); 431 set_debugreg(__get_cpu_var(cpu_debugreg[0]), 0);
@@ -435,7 +436,6 @@ void hw_breakpoint_restore(void)
435 set_debugreg(__get_cpu_var(dr7), 7); 436 set_debugreg(__get_cpu_var(dr7), 7);
436} 437}
437EXPORT_SYMBOL_GPL(hw_breakpoint_restore); 438EXPORT_SYMBOL_GPL(hw_breakpoint_restore);
438#endif
439 439
440/* 440/*
441 * Handle debug exception notifications. 441 * Handle debug exception notifications.