1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __UM_PROCESSOR_H
3 #define __UM_PROCESSOR_H
5 /* include faultinfo structure */
6 #include <sysdep/faultinfo.h>
9 # include "processor_32.h"
11 # include "processor_64.h"
14 #define KSTK_EIP(tsk) KSTK_REG(tsk, HOST_IP)
15 #define KSTK_ESP(tsk) KSTK_REG(tsk, HOST_SP)
16 #define KSTK_EBP(tsk) KSTK_REG(tsk, HOST_BP)
18 #define ARCH_IS_STACKGROW(address) \
19 (address + 65536 + 32 * sizeof(unsigned long) >= UPT_SP(¤t->thread.regs.regs))
23 /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
24 static inline void rep_nop(void)
26 __asm__
__volatile__("rep;nop": : :"memory");
29 #define cpu_relax() rep_nop()
31 #define task_pt_regs(t) (&(t)->thread.regs)
33 #include <asm/processor-generic.h>