diff options
author | Vincent Hanquez <vincent.hanquez@cl.cam.ac.uk> | 2005-06-23 09:08:46 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-23 18:45:14 +0200 |
commit | e9129e56e9ec50c0689eb4cf7a3ca132f1e776db (patch) | |
tree | 46ef37651b1d25afbe002e00d8c80c85df27d5fd /arch/x86_64/kernel/traps.c | |
parent | [PATCH] xen: x86: Use more usermode macro (diff) | |
download | linux-e9129e56e9ec50c0689eb4cf7a3ca132f1e776db.tar.xz linux-e9129e56e9ec50c0689eb4cf7a3ca132f1e776db.zip |
[PATCH] xen: x86_64: Add macro for debugreg
Add 2 macros to set and get debugreg on x86_64. This is useful for Xen
because it will need only to redefine each macro to a hypervisor call.
Signed-off-by: Vincent Hanquez <vincent.hanquez@cl.cam.ac.uk>
Cc: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/traps.c')
-rw-r--r-- | arch/x86_64/kernel/traps.c | 4 |
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) } #endif - asm("movq %%db6,%0" : "=r" (condition)); + get_debugreg(condition, 6); if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code, SIGTRAP) == NOTIFY_STOP) @@ -721,7 +721,7 @@ asmlinkage void do_debug(struct pt_regs * regs, unsigned long error_code) info.si_addr = (void __user *)regs->rip; force_sig_info(SIGTRAP, &info, tsk); clear_dr7: - asm volatile("movq %0,%%db7"::"r"(0UL)); + set_debugreg(0UL, 7); return; clear_TF_reenable: |