xref: /linux/arch/x86/um/asm/processor_64.h (revision 26b0d14106954ae46d2f4f7eec3481828a210f7d)
1 /*
2  * Copyright 2003 PathScale, Inc.
3  *
4  * Licensed under the GPL
5  */
6 
7 #ifndef __UM_PROCESSOR_X86_64_H
8 #define __UM_PROCESSOR_X86_64_H
9 
10 struct arch_thread {
11         unsigned long debugregs[8];
12         int debugregs_seq;
13         unsigned long fs;
14         struct faultinfo faultinfo;
15 };
16 
17 #define INIT_ARCH_THREAD { .debugregs  		= { [ 0 ... 7 ] = 0 }, \
18 			   .debugregs_seq	= 0, \
19 			   .fs			= 0, \
20 			   .faultinfo		= { 0, 0, 0 } }
21 
22 static inline void arch_flush_thread(struct arch_thread *thread)
23 {
24 }
25 
26 static inline void arch_copy_thread(struct arch_thread *from,
27                                     struct arch_thread *to)
28 {
29 	to->fs = from->fs;
30 }
31 
32 #define current_text_addr() \
33 	({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })
34 
35 #endif
36