um: take arch/um/sys-x86 to arch/x86/um
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / x86 / um / asm / processor_64.h
blob6db812b24f48a5382d2bc88d6d5f5295203ac79d
1 /*
2 * Copyright 2003 PathScale, Inc.
4 * Licensed under the GPL
5 */
7 #ifndef __UM_PROCESSOR_X86_64_H
8 #define __UM_PROCESSOR_X86_64_H
10 struct arch_thread {
11 unsigned long debugregs[8];
12 int debugregs_seq;
13 unsigned long fs;
14 struct faultinfo faultinfo;
17 /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
18 static inline void rep_nop(void)
20 __asm__ __volatile__("rep;nop": : :"memory");
23 #define cpu_relax() rep_nop()
25 #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \
26 .debugregs_seq = 0, \
27 .fs = 0, \
28 .faultinfo = { 0, 0, 0 } }
30 static inline void arch_flush_thread(struct arch_thread *thread)
34 static inline void arch_copy_thread(struct arch_thread *from,
35 struct arch_thread *to)
37 to->fs = from->fs;
40 #include <asm/user.h>
42 #define current_text_addr() \
43 ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })
45 #define ARCH_IS_STACKGROW(address) \
46 (address + 128 >= UPT_SP(&current->thread.regs.regs))
48 #define KSTK_EIP(tsk) KSTK_REG(tsk, RIP)
49 #define KSTK_ESP(tsk) KSTK_REG(tsk, RSP)
51 #endif