WIP FPC-III support
[linux/fpc-iii.git] / arch / x86 / um / asm / processor.h
blob478710384b340fe2ec28133c26dda88ca56fec11
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>
9 #ifdef CONFIG_X86_32
10 # include "processor_32.h"
11 #else
12 # include "processor_64.h"
13 #endif
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(&current->thread.regs.regs))
22 #include <asm/user.h>
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);
35 else
36 rep_nop();
39 #define task_pt_regs(t) (&(t)->thread.regs)
41 #include <asm/processor-generic.h>
43 #endif