15c48b108SAl Viro #ifndef __UM_PROCESSOR_H 25c48b108SAl Viro #define __UM_PROCESSOR_H 35c48b108SAl Viro 45c48b108SAl Viro /* include faultinfo structure */ 55c48b108SAl Viro #include <sysdep/faultinfo.h> 65c48b108SAl Viro 75c48b108SAl Viro #ifdef CONFIG_X86_32 85c48b108SAl Viro # include "processor_32.h" 95c48b108SAl Viro #else 105c48b108SAl Viro # include "processor_64.h" 115c48b108SAl Viro #endif 125c48b108SAl Viro 13a10c95d8SAl Viro #define KSTK_EIP(tsk) KSTK_REG(tsk, HOST_IP) 14cc11f9edSAl Viro #define KSTK_ESP(tsk) KSTK_REG(tsk, HOST_SP) 15a10c95d8SAl Viro #define KSTK_EBP(tsk) KSTK_REG(tsk, HOST_BP) 16a10c95d8SAl Viro 17c7ea591cSAl Viro #define ARCH_IS_STACKGROW(address) \ 18c7ea591cSAl Viro (address + 65536 + 32 * sizeof(unsigned long) >= UPT_SP(¤t->thread.regs.regs)) 19c7ea591cSAl Viro 20*c56334dbSAl Viro #include <asm/user.h> 21*c56334dbSAl Viro 22*c56334dbSAl Viro /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ 23*c56334dbSAl Viro static inline void rep_nop(void) 24*c56334dbSAl Viro { 25*c56334dbSAl Viro __asm__ __volatile__("rep;nop": : :"memory"); 26*c56334dbSAl Viro } 27*c56334dbSAl Viro 28*c56334dbSAl Viro #define cpu_relax() rep_nop() 29*c56334dbSAl Viro 305c48b108SAl Viro #include <asm/processor-generic.h> 315c48b108SAl Viro 325c48b108SAl Viro #endif 33