2011-08-18 19:02:59 +00:00
|
|
|
#ifndef __UM_PROCESSOR_H
|
|
|
|
#define __UM_PROCESSOR_H
|
|
|
|
|
|
|
|
/* include faultinfo structure */
|
|
|
|
#include <sysdep/faultinfo.h>
|
|
|
|
|
|
|
|
#ifdef CONFIG_X86_32
|
|
|
|
# include "processor_32.h"
|
|
|
|
#else
|
|
|
|
# include "processor_64.h"
|
|
|
|
#endif
|
|
|
|
|
2011-08-18 19:12:09 +00:00
|
|
|
#define KSTK_EIP(tsk) KSTK_REG(tsk, HOST_IP)
|
2011-11-21 03:52:18 +00:00
|
|
|
#define KSTK_ESP(tsk) KSTK_REG(tsk, HOST_SP)
|
2011-08-18 19:12:09 +00:00
|
|
|
#define KSTK_EBP(tsk) KSTK_REG(tsk, HOST_BP)
|
|
|
|
|
2011-08-18 19:10:19 +00:00
|
|
|
#define ARCH_IS_STACKGROW(address) \
|
|
|
|
(address + 65536 + 32 * sizeof(unsigned long) >= UPT_SP(¤t->thread.regs.regs))
|
|
|
|
|
2011-11-20 22:23:39 +00:00
|
|
|
#include <asm/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()
|
|
|
|
|
2011-08-18 19:02:59 +00:00
|
|
|
#include <asm/processor-generic.h>
|
|
|
|
|
|
|
|
#endif
|