aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64
diff options
context:
space:
mode:
authorVincent Hanquez <vincent.hanquez@cl.cam.ac.uk>2005-06-23 03:08:46 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-23 12:45:14 -0400
commite9129e56e9ec50c0689eb4cf7a3ca132f1e776db (patch)
tree46ef37651b1d25afbe002e00d8c80c85df27d5fd /include/asm-x86_64
parent717b594a415bfaf2dbd5e8266636488f2564c689 (diff)
[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 'include/asm-x86_64')
-rw-r--r--include/asm-x86_64/processor.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h
index 8b55f139968f..106f666517bb 100644
--- a/include/asm-x86_64/processor.h
+++ b/include/asm-x86_64/processor.h
@@ -280,6 +280,14 @@ struct thread_struct {
280 set_fs(USER_DS); \ 280 set_fs(USER_DS); \
281} while(0) 281} while(0)
282 282
283#define get_debugreg(var, register) \
284 __asm__("movq %%db" #register ", %0" \
285 :"=r" (var))
286#define set_debugreg(value, register) \
287 __asm__("movq %0,%%db" #register \
288 : /* no output */ \
289 :"r" (value))
290
283struct task_struct; 291struct task_struct;
284struct mm_struct; 292struct mm_struct;
285 293