aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/kernel/traps.c')
-rw-r--r--arch/x86_64/kernel/traps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index 3dfec8fdabcd..21706c1a0f95 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -669,7 +669,7 @@ asmlinkage void do_debug(struct pt_regs * regs, unsigned long error_code)
669 } 669 }
670#endif 670#endif
671 671
672 asm("movq %%db6,%0" : "=r" (condition)); 672 get_debugreg(condition, 6);
673 673
674 if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code, 674 if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code,
675 SIGTRAP) == NOTIFY_STOP) 675 SIGTRAP) == NOTIFY_STOP)
@@ -721,7 +721,7 @@ asmlinkage void do_debug(struct pt_regs * regs, unsigned long error_code)
721 info.si_addr = (void __user *)regs->rip; 721 info.si_addr = (void __user *)regs->rip;
722 force_sig_info(SIGTRAP, &info, tsk); 722 force_sig_info(SIGTRAP, &info, tsk);
723clear_dr7: 723clear_dr7:
724 asm volatile("movq %0,%%db7"::"r"(0UL)); 724 set_debugreg(0UL, 7);
725 return; 725 return;
726 726
727clear_TF_reenable: 727clear_TF_reenable: