1 #ifndef _ASM_M32R_THREAD_INFO_H
2 #define _ASM_M32R_THREAD_INFO_H
14 #include <asm/processor.h>
45 #define TI_TASK 0x00000000
46 #define TI_EXEC_DOMAIN 0x00000004
47 #define TI_FLAGS 0x00000008
48 #define TI_STATUS 0x0000000C
49 #define TI_CPU 0x00000010
50 #define TI_PRE_COUNT 0x00000014
51 #define TI_ADDR_LIMIT 0x00000018
52 #define TI_RESTART_BLOCK 0x000001C
56 #define PREEMPT_ACTIVE 0x10000000
58 #define THREAD_SIZE (PAGE_SIZE << 1)
59 #define THREAD_SIZE_ORDER 1
65 #define INIT_THREAD_INFO(tsk) \
68 .exec_domain = &default_exec_domain, \
71 .preempt_count = INIT_PREEMPT_COUNT, \
72 .addr_limit = KERNEL_DS, \
74 .fn = do_no_restart_syscall, \
78 #define init_thread_info (init_thread_union.thread_info)
79 #define init_stack (init_thread_union.stack)
95 #define TI_FLAG_FAULT_CODE_SHIFT 28
97 static inline void set_thread_fault_code(
unsigned int val)
100 ti->
flags = (ti->
flags & (~0 >> (32 - TI_FLAG_FAULT_CODE_SHIFT)))
101 | (val << TI_FLAG_FAULT_CODE_SHIFT);
104 static inline unsigned int get_thread_fault_code(
void)
107 return ti->
flags >> TI_FLAG_FAULT_CODE_SHIFT;
118 #define TIF_SYSCALL_TRACE 0
119 #define TIF_SIGPENDING 1
120 #define TIF_NEED_RESCHED 2
121 #define TIF_SINGLESTEP 3
122 #define TIF_NOTIFY_RESUME 5
123 #define TIF_RESTORE_SIGMASK 8
124 #define TIF_USEDFPU 16
125 #define TIF_MEMDIE 18
127 #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
128 #define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
129 #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
130 #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
131 #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
132 #define _TIF_USEDFPU (1<<TIF_USEDFPU)
134 #define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_NOTIFY_RESUME)
135 #define _TIF_ALLWORK_MASK (_TIF_WORK_MASK | _TIF_SYSCALL_TRACE)
144 #define TS_USEDFPU 0x0001