1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __UM_PROCESSOR_H
3 #define __UM_PROCESSOR_H
4 #include <linux/time-internal.h>
6 /* include faultinfo structure */
7 #include <sysdep/faultinfo.h>
10 # include "processor_32.h"
12 # include "processor_64.h"
15 #define KSTK_EIP(tsk) KSTK_REG(tsk, HOST_IP)
16 #define KSTK_ESP(tsk) KSTK_REG(tsk, HOST_SP)
17 #define KSTK_EBP(tsk) KSTK_REG(tsk, HOST_BP)
19 #define ARCH_IS_STACKGROW(address) \
20 (address + 65536 + 32 * sizeof(unsigned long) >= UPT_SP(¤t->thread.regs.regs))
24 /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
25 static __always_inline
void rep_nop(void)
27 __asm__
__volatile__("rep;nop": : :"memory");
30 static __always_inline
void cpu_relax(void)
32 if (time_travel_mode
== TT_MODE_INFCPU
||
33 time_travel_mode
== TT_MODE_EXTERNAL
)
34 time_travel_ndelay(1);
39 #define task_pt_regs(t) (&(t)->thread.regs)
41 #include <asm/processor-generic.h>