aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/um/asm/processor_64.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/um/asm/processor_64.h')
-rw-r--r--arch/x86/um/asm/processor_64.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/x86/um/asm/processor_64.h b/arch/x86/um/asm/processor_64.h
new file mode 100644
index 00000000000..61de92d916c
--- /dev/null
+++ b/arch/x86/um/asm/processor_64.h
@@ -0,0 +1,45 @@
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
10struct arch_thread {
11 unsigned long debugregs[8];
12 int debugregs_seq;
13 unsigned long fs;
14 struct faultinfo faultinfo;
15};
16
17/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
18static inline void rep_nop(void)
19{
20 __asm__ __volatile__("rep;nop": : :"memory");
21}
22
23#define cpu_relax() rep_nop()
24
25#define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \
26 .debugregs_seq = 0, \
27 .fs = 0, \
28 .faultinfo = { 0, 0, 0 } }
29
30static inline void arch_flush_thread(struct arch_thread *thread)
31{
32}
33
34static inline void arch_copy_thread(struct arch_thread *from,
35 struct arch_thread *to)
36{
37 to->fs = from->fs;
38}
39
40#include <asm/user.h>
41
42#define current_text_addr() \
43 ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })
44
45#endif