[AGPGART] Loop cleanup
[linux-2.6/mini2440.git] / include / asm-um / processor-x86_64.h
blobe1e1255a1d3655c18bc2aa2206eead6187170a2b
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 /* include faultinfo structure */
11 #include "sysdep/faultinfo.h"
13 struct arch_thread {
14 unsigned long debugregs[8];
15 int debugregs_seq;
16 struct faultinfo faultinfo;
19 /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
20 extern inline void rep_nop(void)
22 __asm__ __volatile__("rep;nop": : :"memory");
25 #define cpu_relax() rep_nop()
27 #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \
28 .debugregs_seq = 0, \
29 .faultinfo = { 0, 0, 0 } }
31 #include "asm/arch/user.h"
33 #define current_text_addr() \
34 ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })
36 #define ARCH_IS_STACKGROW(address) \
37 (address + 128 >= UPT_SP(&current->thread.regs.regs))
39 #define KSTK_EIP(tsk) KSTK_REG(tsk, RIP)
40 #define KSTK_ESP(tsk) KSTK_REG(tsk, RSP)
42 #include "asm/processor-generic.h"
44 #endif