hc
2024-11-01 2f529f9b558ca1c1bd74be7437a84e4711743404
kernel/arch/x86/include/asm/thread_info.h
....@@ -52,16 +52,20 @@
5252 struct task_struct;
5353 #include <asm/cpufeature.h>
5454 #include <linux/atomic.h>
55
+#include <dovetail/thread_info.h>
5556
5657 struct thread_info {
5758 unsigned long flags; /* low level flags */
5859 u32 status; /* thread synchronous flags */
60
+ struct oob_thread_state oob_state; /* co-kernel thread state */
5961 };
6062
6163 #define INIT_THREAD_INFO(tsk) \
6264 { \
6365 .flags = 0, \
6466 }
67
+
68
+#define ti_local_flags(__ti) ((__ti)->status)
6569
6670 #else /* !__ASSEMBLY__ */
6771
....@@ -97,8 +101,10 @@
97101 #define TIF_MEMDIE 20 /* is terminating due to OOM killer */
98102 #define TIF_POLLING_NRFLAG 21 /* idle is polling for TIF_NEED_RESCHED */
99103 #define TIF_IO_BITMAP 22 /* uses I/O bitmap */
104
+#define TIF_RETUSER 23 /* INBAND_TASK_RETUSER is pending */
100105 #define TIF_FORCED_TF 24 /* true if TF in eflags artificially */
101106 #define TIF_BLOCKSTEP 25 /* set when we want DEBUGCTLMSR_BTF */
107
+#define TIF_MAYDAY 26 /* emergency trap pending */
102108 #define TIF_LAZY_MMU_UPDATES 27 /* task is updating the mmu lazily */
103109 #define TIF_SYSCALL_TRACEPOINT 28 /* syscall tracepoint instrumentation */
104110 #define TIF_ADDR32 29 /* 32-bit address space on 64 bits */
....@@ -126,7 +132,9 @@
126132 #define _TIF_SLD (1 << TIF_SLD)
127133 #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
128134 #define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP)
135
+#define _TIF_RETUSER (1 << TIF_RETUSER)
129136 #define _TIF_FORCED_TF (1 << TIF_FORCED_TF)
137
+#define _TIF_MAYDAY (1 << TIF_MAYDAY)
130138 #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP)
131139 #define _TIF_LAZY_MMU_UPDATES (1 << TIF_LAZY_MMU_UPDATES)
132140 #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
....@@ -226,6 +234,16 @@
226234 * have to worry about atomic accesses.
227235 */
228236 #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
229247
230248 #ifndef __ASSEMBLY__
231249 #ifdef CONFIG_COMPAT