.. | .. |
---|
52 | 52 | struct task_struct; |
---|
53 | 53 | #include <asm/cpufeature.h> |
---|
54 | 54 | #include <linux/atomic.h> |
---|
| 55 | +#include <dovetail/thread_info.h> |
---|
55 | 56 | |
---|
56 | 57 | struct thread_info { |
---|
57 | 58 | unsigned long flags; /* low level flags */ |
---|
58 | 59 | u32 status; /* thread synchronous flags */ |
---|
| 60 | + struct oob_thread_state oob_state; /* co-kernel thread state */ |
---|
59 | 61 | }; |
---|
60 | 62 | |
---|
61 | 63 | #define INIT_THREAD_INFO(tsk) \ |
---|
62 | 64 | { \ |
---|
63 | 65 | .flags = 0, \ |
---|
64 | 66 | } |
---|
| 67 | + |
---|
| 68 | +#define ti_local_flags(__ti) ((__ti)->status) |
---|
65 | 69 | |
---|
66 | 70 | #else /* !__ASSEMBLY__ */ |
---|
67 | 71 | |
---|
.. | .. |
---|
97 | 101 | #define TIF_MEMDIE 20 /* is terminating due to OOM killer */ |
---|
98 | 102 | #define TIF_POLLING_NRFLAG 21 /* idle is polling for TIF_NEED_RESCHED */ |
---|
99 | 103 | #define TIF_IO_BITMAP 22 /* uses I/O bitmap */ |
---|
| 104 | +#define TIF_RETUSER 23 /* INBAND_TASK_RETUSER is pending */ |
---|
100 | 105 | #define TIF_FORCED_TF 24 /* true if TF in eflags artificially */ |
---|
101 | 106 | #define TIF_BLOCKSTEP 25 /* set when we want DEBUGCTLMSR_BTF */ |
---|
| 107 | +#define TIF_MAYDAY 26 /* emergency trap pending */ |
---|
102 | 108 | #define TIF_LAZY_MMU_UPDATES 27 /* task is updating the mmu lazily */ |
---|
103 | 109 | #define TIF_SYSCALL_TRACEPOINT 28 /* syscall tracepoint instrumentation */ |
---|
104 | 110 | #define TIF_ADDR32 29 /* 32-bit address space on 64 bits */ |
---|
.. | .. |
---|
126 | 132 | #define _TIF_SLD (1 << TIF_SLD) |
---|
127 | 133 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
---|
128 | 134 | #define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP) |
---|
| 135 | +#define _TIF_RETUSER (1 << TIF_RETUSER) |
---|
129 | 136 | #define _TIF_FORCED_TF (1 << TIF_FORCED_TF) |
---|
| 137 | +#define _TIF_MAYDAY (1 << TIF_MAYDAY) |
---|
130 | 138 | #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP) |
---|
131 | 139 | #define _TIF_LAZY_MMU_UPDATES (1 << TIF_LAZY_MMU_UPDATES) |
---|
132 | 140 | #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) |
---|
.. | .. |
---|
226 | 234 | * have to worry about atomic accesses. |
---|
227 | 235 | */ |
---|
228 | 236 | #define TS_COMPAT 0x0002 /* 32bit syscall active (64BIT)*/ |
---|
| 237 | +/* bits 2 and 3 reserved for compat */ |
---|
| 238 | +#define TS_OOB 0x0010 /* Thread is running out-of-band */ |
---|
| 239 | +#define TS_DOVETAIL 0x0020 /* Dovetail notifier enabled */ |
---|
| 240 | +#define TS_OFFSTAGE 0x0040 /* Thread is in-flight to OOB context */ |
---|
| 241 | +#define TS_OOBTRAP 0x0080 /* Handling a trap from OOB context */ |
---|
| 242 | + |
---|
| 243 | +#define _TLF_OOB TS_OOB |
---|
| 244 | +#define _TLF_DOVETAIL TS_DOVETAIL |
---|
| 245 | +#define _TLF_OFFSTAGE TS_OFFSTAGE |
---|
| 246 | +#define _TLF_OOBTRAP TS_OOBTRAP |
---|
229 | 247 | |
---|
230 | 248 | #ifndef __ASSEMBLY__ |
---|
231 | 249 | #ifdef CONFIG_COMPAT |
---|