diff options
Diffstat (limited to 'arch/x86/kernel/process.c')
| -rw-r--r-- | arch/x86/kernel/process.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index cf8ee001630..744508e7cfd 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/clockchips.h> | 10 | #include <linux/clockchips.h> |
| 11 | #include <linux/random.h> | 11 | #include <linux/random.h> |
| 12 | #include <trace/events/power.h> | 12 | #include <trace/events/power.h> |
| 13 | #include <linux/hw_breakpoint.h> | ||
| 13 | #include <asm/system.h> | 14 | #include <asm/system.h> |
| 14 | #include <asm/apic.h> | 15 | #include <asm/apic.h> |
| 15 | #include <asm/syscalls.h> | 16 | #include <asm/syscalls.h> |
| @@ -18,7 +19,6 @@ | |||
| 18 | #include <asm/i387.h> | 19 | #include <asm/i387.h> |
| 19 | #include <asm/ds.h> | 20 | #include <asm/ds.h> |
| 20 | #include <asm/debugreg.h> | 21 | #include <asm/debugreg.h> |
| 21 | #include <asm/hw_breakpoint.h> | ||
| 22 | 22 | ||
| 23 | unsigned long idle_halt; | 23 | unsigned long idle_halt; |
| 24 | EXPORT_SYMBOL(idle_halt); | 24 | EXPORT_SYMBOL(idle_halt); |
| @@ -47,8 +47,6 @@ void free_thread_xstate(struct task_struct *tsk) | |||
| 47 | kmem_cache_free(task_xstate_cachep, tsk->thread.xstate); | 47 | kmem_cache_free(task_xstate_cachep, tsk->thread.xstate); |
| 48 | tsk->thread.xstate = NULL; | 48 | tsk->thread.xstate = NULL; |
| 49 | } | 49 | } |
| 50 | if (unlikely(test_tsk_thread_flag(tsk, TIF_DEBUG))) | ||
| 51 | flush_thread_hw_breakpoint(tsk); | ||
| 52 | 50 | ||
| 53 | WARN(tsk->thread.ds_ctx, "leaking DS context\n"); | 51 | WARN(tsk->thread.ds_ctx, "leaking DS context\n"); |
| 54 | } | 52 | } |
| @@ -107,8 +105,7 @@ void flush_thread(void) | |||
| 107 | } | 105 | } |
| 108 | #endif | 106 | #endif |
| 109 | 107 | ||
| 110 | if (unlikely(test_tsk_thread_flag(tsk, TIF_DEBUG))) | 108 | flush_ptrace_hw_breakpoint(tsk); |
| 111 | flush_thread_hw_breakpoint(tsk); | ||
| 112 | memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array)); | 109 | memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array)); |
| 113 | /* | 110 | /* |
| 114 | * Forget coprocessor state.. | 111 | * Forget coprocessor state.. |
