xref: /linux/include/asm-generic/thread_info_tif.h (revision 7601d18be06943d5ac2b1802899ff6c303544936)
1*29589343SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0 */
2*29589343SThomas Gleixner #ifndef _ASM_GENERIC_THREAD_INFO_TIF_H_
3*29589343SThomas Gleixner #define _ASM_GENERIC_THREAD_INFO_TIF_H_
4*29589343SThomas Gleixner 
5*29589343SThomas Gleixner #include <vdso/bits.h>
6*29589343SThomas Gleixner 
7*29589343SThomas Gleixner /* Bits 16-31 are reserved for architecture specific purposes */
8*29589343SThomas Gleixner 
9*29589343SThomas Gleixner #define TIF_NOTIFY_RESUME	0	// callback before returning to user
10*29589343SThomas Gleixner #define _TIF_NOTIFY_RESUME	BIT(TIF_NOTIFY_RESUME)
11*29589343SThomas Gleixner 
12*29589343SThomas Gleixner #define TIF_SIGPENDING		1	// signal pending
13*29589343SThomas Gleixner #define _TIF_SIGPENDING		BIT(TIF_SIGPENDING)
14*29589343SThomas Gleixner 
15*29589343SThomas Gleixner #define TIF_NOTIFY_SIGNAL	2	// signal notifications exist
16*29589343SThomas Gleixner #define _TIF_NOTIFY_SIGNAL	BIT(TIF_NOTIFY_SIGNAL)
17*29589343SThomas Gleixner 
18*29589343SThomas Gleixner #define TIF_MEMDIE		3	// is terminating due to OOM killer
19*29589343SThomas Gleixner #define _TIF_MEMDIE		BIT(TIF_MEMDIE)
20*29589343SThomas Gleixner 
21*29589343SThomas Gleixner #define TIF_NEED_RESCHED	4	// rescheduling necessary
22*29589343SThomas Gleixner #define _TIF_NEED_RESCHED	BIT(TIF_NEED_RESCHED)
23*29589343SThomas Gleixner 
24*29589343SThomas Gleixner #ifdef HAVE_TIF_NEED_RESCHED_LAZY
25*29589343SThomas Gleixner # define TIF_NEED_RESCHED_LAZY	5	// Lazy rescheduling needed
26*29589343SThomas Gleixner # define _TIF_NEED_RESCHED_LAZY	BIT(TIF_NEED_RESCHED_LAZY)
27*29589343SThomas Gleixner #endif
28*29589343SThomas Gleixner 
29*29589343SThomas Gleixner #ifdef HAVE_TIF_POLLING_NRFLAG
30*29589343SThomas Gleixner # define TIF_POLLING_NRFLAG	6	// idle is polling for TIF_NEED_RESCHED
31*29589343SThomas Gleixner # define _TIF_POLLING_NRFLAG	BIT(TIF_POLLING_NRFLAG)
32*29589343SThomas Gleixner #endif
33*29589343SThomas Gleixner 
34*29589343SThomas Gleixner #define TIF_USER_RETURN_NOTIFY	7	// notify kernel of userspace return
35*29589343SThomas Gleixner #define _TIF_USER_RETURN_NOTIFY	BIT(TIF_USER_RETURN_NOTIFY)
36*29589343SThomas Gleixner 
37*29589343SThomas Gleixner #define TIF_UPROBE		8	// breakpointed or singlestepping
38*29589343SThomas Gleixner #define _TIF_UPROBE		BIT(TIF_UPROBE)
39*29589343SThomas Gleixner 
40*29589343SThomas Gleixner #define TIF_PATCH_PENDING	9	// pending live patching update
41*29589343SThomas Gleixner #define _TIF_PATCH_PENDING	BIT(TIF_PATCH_PENDING)
42*29589343SThomas Gleixner 
43*29589343SThomas Gleixner #ifdef HAVE_TIF_RESTORE_SIGMASK
44*29589343SThomas Gleixner # define TIF_RESTORE_SIGMASK	10	// Restore signal mask in do_signal() */
45*29589343SThomas Gleixner # define _TIF_RESTORE_SIGMASK	BIT(TIF_RESTORE_SIGMASK)
46*29589343SThomas Gleixner #endif
47*29589343SThomas Gleixner 
48*29589343SThomas Gleixner #endif /* _ASM_GENERIC_THREAD_INFO_TIF_H_ */
49