X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-um%2Fprocessor-i386.h;h=431bad3ae9d7cf33f72ec43cdd779e58cec12bb2;hb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;hp=633cfad9cb0db9c1559d25fdef5af0a1e5ca1ad5;hpb=e3f6fb6212a7102bdb56ba38fa1e98fe72950475;p=linux-2.6.git diff --git a/include/asm-um/processor-i386.h b/include/asm-um/processor-i386.h index 633cfad9c..431bad3ae 100644 --- a/include/asm-um/processor-i386.h +++ b/include/asm-um/processor-i386.h @@ -9,16 +9,29 @@ extern int host_has_xmm; extern int host_has_cmov; +/* include faultinfo structure */ +#include "sysdep/faultinfo.h" + struct arch_thread { unsigned long debugregs[8]; int debugregs_seq; + struct faultinfo faultinfo; }; #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ - .debugregs_seq = 0 } + .debugregs_seq = 0, \ + .faultinfo = { 0, 0, 0 } } #include "asm/arch/user.h" +/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ +static inline void rep_nop(void) +{ + __asm__ __volatile__("rep;nop": : :"memory"); +} + +#define cpu_relax() rep_nop() + /* * Default implementation of macro that returns current * instruction pointer ("program counter"). Stolen