Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'core-core-2025-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull TIF bit unification updates from Thomas Gleixner:
"A set of changes to consolidate the generic TIF (thread info flag)
bits accross architectures.

All architectures define the same set of generic TIF bits. This makes
it pointlessly hard to add a new generic TIF bit or to change an
existing one.

Provide a generic variant and convert the architectures which utilize
the generic entry code over to use it. The TIF space is divided into
16 generic bits and 16 architecture specific bits, which turned out to
provide enough space on both sides"

* tag 'core-core-2025-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
LoongArch: Fix bitflag conflict for TIF_FIXADE
riscv: Use generic TIF bits
loongarch: Use generic TIF bits
s390/entry: Remove unused TIF flags
s390: Use generic TIF bits
x86: Use generic TIF bits
asm-generic: Provide generic TIF infrastructure

+148 -137
+4
arch/Kconfig
··· 1778 1778 relocations preserved. This is used by some architectures to 1779 1779 construct bespoke relocation tables for KASLR. 1780 1780 1781 + # Select if architecture uses the common generic TIF bits 1782 + config HAVE_GENERIC_TIF_BITS 1783 + bool 1784 + 1781 1785 source "kernel/gcov/Kconfig" 1782 1786 1783 1787 source "scripts/gcc-plugins/Kconfig"
+1
arch/loongarch/Kconfig
··· 142 142 select HAVE_EBPF_JIT 143 143 select HAVE_EFFICIENT_UNALIGNED_ACCESS if !ARCH_STRICT_ALIGN 144 144 select HAVE_EXIT_THREAD 145 + select HAVE_GENERIC_TIF_BITS 145 146 select HAVE_GUP_FAST 146 147 select HAVE_FTRACE_GRAPH_FUNC 147 148 select HAVE_FUNCTION_ARG_ACCESS_API
+34 -42
arch/loongarch/include/asm/thread_info.h
··· 65 65 * access 66 66 * - pending work-to-be-done flags are in LSW 67 67 * - other flags in MSW 68 + * 69 + * Tell the generic TIF infrastructure which special bits loongarch supports 68 70 */ 69 - #define TIF_NEED_RESCHED 0 /* rescheduling necessary */ 70 - #define TIF_NEED_RESCHED_LAZY 1 /* lazy rescheduling necessary */ 71 - #define TIF_SIGPENDING 2 /* signal pending */ 72 - #define TIF_NOTIFY_RESUME 3 /* callback before returning to user */ 73 - #define TIF_NOTIFY_SIGNAL 4 /* signal notifications exist */ 74 - #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ 75 - #define TIF_NOHZ 6 /* in adaptive nohz mode */ 76 - #define TIF_UPROBE 7 /* breakpointed or singlestepping */ 77 - #define TIF_USEDFPU 8 /* FPU was used by this task this quantum (SMP) */ 78 - #define TIF_USEDSIMD 9 /* SIMD has been used this quantum */ 79 - #define TIF_MEMDIE 10 /* is terminating due to OOM killer */ 80 - #define TIF_FIXADE 11 /* Fix address errors in software */ 81 - #define TIF_LOGADE 12 /* Log address errors to syslog */ 82 - #define TIF_32BIT_REGS 13 /* 32-bit general purpose registers */ 83 - #define TIF_32BIT_ADDR 14 /* 32-bit address space */ 84 - #define TIF_LOAD_WATCH 15 /* If set, load watch registers */ 85 - #define TIF_SINGLESTEP 16 /* Single Step */ 86 - #define TIF_LSX_CTX_LIVE 17 /* LSX context must be preserved */ 87 - #define TIF_LASX_CTX_LIVE 18 /* LASX context must be preserved */ 88 - #define TIF_USEDLBT 19 /* LBT was used by this task this quantum (SMP) */ 89 - #define TIF_LBT_CTX_LIVE 20 /* LBT context must be preserved */ 90 - #define TIF_PATCH_PENDING 21 /* pending live patching update */ 71 + #define HAVE_TIF_NEED_RESCHED_LAZY 72 + #define HAVE_TIF_RESTORE_SIGMASK 91 73 92 - #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 93 - #define _TIF_NEED_RESCHED_LAZY (1<<TIF_NEED_RESCHED_LAZY) 94 - #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 95 - #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) 96 - #define _TIF_NOTIFY_SIGNAL (1<<TIF_NOTIFY_SIGNAL) 97 - #define _TIF_NOHZ (1<<TIF_NOHZ) 98 - #define _TIF_UPROBE (1<<TIF_UPROBE) 99 - #define _TIF_USEDFPU (1<<TIF_USEDFPU) 100 - #define _TIF_USEDSIMD (1<<TIF_USEDSIMD) 101 - #define _TIF_FIXADE (1<<TIF_FIXADE) 102 - #define _TIF_LOGADE (1<<TIF_LOGADE) 103 - #define _TIF_32BIT_REGS (1<<TIF_32BIT_REGS) 104 - #define _TIF_32BIT_ADDR (1<<TIF_32BIT_ADDR) 105 - #define _TIF_LOAD_WATCH (1<<TIF_LOAD_WATCH) 106 - #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) 107 - #define _TIF_LSX_CTX_LIVE (1<<TIF_LSX_CTX_LIVE) 108 - #define _TIF_LASX_CTX_LIVE (1<<TIF_LASX_CTX_LIVE) 109 - #define _TIF_USEDLBT (1<<TIF_USEDLBT) 110 - #define _TIF_LBT_CTX_LIVE (1<<TIF_LBT_CTX_LIVE) 111 - #define _TIF_PATCH_PENDING (1<<TIF_PATCH_PENDING) 74 + #include <asm-generic/thread_info_tif.h> 75 + 76 + /* Architecture specific bits */ 77 + #define TIF_NOHZ 16 /* in adaptive nohz mode */ 78 + #define TIF_USEDFPU 17 /* FPU was used by this task this quantum (SMP) */ 79 + #define TIF_USEDSIMD 18 /* SIMD has been used this quantum */ 80 + #define TIF_FIXADE 19 /* Fix address errors in software */ 81 + #define TIF_LOGADE 20 /* Log address errors to syslog */ 82 + #define TIF_32BIT_REGS 21 /* 32-bit general purpose registers */ 83 + #define TIF_32BIT_ADDR 22 /* 32-bit address space */ 84 + #define TIF_LOAD_WATCH 23 /* If set, load watch registers */ 85 + #define TIF_SINGLESTEP 24 /* Single Step */ 86 + #define TIF_LSX_CTX_LIVE 25 /* LSX context must be preserved */ 87 + #define TIF_LASX_CTX_LIVE 26 /* LASX context must be preserved */ 88 + #define TIF_USEDLBT 27 /* LBT was used by this task this quantum (SMP) */ 89 + #define TIF_LBT_CTX_LIVE 28 /* LBT context must be preserved */ 90 + 91 + #define _TIF_NOHZ BIT(TIF_NOHZ) 92 + #define _TIF_USEDFPU BIT(TIF_USEDFPU) 93 + #define _TIF_USEDSIMD BIT(TIF_USEDSIMD) 94 + #define _TIF_FIXADE BIT(TIF_FIXADE) 95 + #define _TIF_LOGADE BIT(TIF_LOGADE) 96 + #define _TIF_32BIT_REGS BIT(TIF_32BIT_REGS) 97 + #define _TIF_32BIT_ADDR BIT(TIF_32BIT_ADDR) 98 + #define _TIF_LOAD_WATCH BIT(TIF_LOAD_WATCH) 99 + #define _TIF_SINGLESTEP BIT(TIF_SINGLESTEP) 100 + #define _TIF_LSX_CTX_LIVE BIT(TIF_LSX_CTX_LIVE) 101 + #define _TIF_LASX_CTX_LIVE BIT(TIF_LASX_CTX_LIVE) 102 + #define _TIF_USEDLBT BIT(TIF_USEDLBT) 103 + #define _TIF_LBT_CTX_LIVE BIT(TIF_LBT_CTX_LIVE) 112 104 113 105 #endif /* __KERNEL__ */ 114 106 #endif /* _ASM_THREAD_INFO_H */
+1
arch/riscv/Kconfig
··· 164 164 select HAVE_FUNCTION_GRAPH_FREGS 165 165 select HAVE_FUNCTION_TRACER if !XIP_KERNEL && HAVE_DYNAMIC_FTRACE 166 166 select HAVE_EBPF_JIT if MMU 167 + select HAVE_GENERIC_TIF_BITS 167 168 select HAVE_GUP_FAST if MMU 168 169 select HAVE_FUNCTION_ARG_ACCESS_API 169 170 select HAVE_FUNCTION_ERROR_INJECTION
+12 -17
arch/riscv/include/asm/thread_info.h
··· 107 107 * - pending work-to-be-done flags are in lowest half-word 108 108 * - other flags in upper half-word(s) 109 109 */ 110 - #define TIF_NEED_RESCHED 0 /* rescheduling necessary */ 111 - #define TIF_NEED_RESCHED_LAZY 1 /* Lazy rescheduling needed */ 112 - #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ 113 - #define TIF_SIGPENDING 3 /* signal pending */ 114 - #define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */ 115 - #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ 116 - #define TIF_NOTIFY_SIGNAL 9 /* signal notifications exist */ 117 - #define TIF_UPROBE 10 /* uprobe breakpoint or singlestep */ 118 - #define TIF_32BIT 11 /* compat-mode 32bit process */ 119 - #define TIF_RISCV_V_DEFER_RESTORE 12 /* restore Vector before returing to user */ 120 110 121 - #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 122 - #define _TIF_NEED_RESCHED_LAZY (1 << TIF_NEED_RESCHED_LAZY) 123 - #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 124 - #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 125 - #define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL) 126 - #define _TIF_UPROBE (1 << TIF_UPROBE) 127 - #define _TIF_RISCV_V_DEFER_RESTORE (1 << TIF_RISCV_V_DEFER_RESTORE) 111 + /* 112 + * Tell the generic TIF infrastructure which bits riscv supports 113 + */ 114 + #define HAVE_TIF_NEED_RESCHED_LAZY 115 + #define HAVE_TIF_RESTORE_SIGMASK 116 + 117 + #include <asm-generic/thread_info_tif.h> 118 + 119 + #define TIF_32BIT 16 /* compat-mode 32bit process */ 120 + #define TIF_RISCV_V_DEFER_RESTORE 17 /* restore Vector before returing to user */ 121 + 122 + #define _TIF_RISCV_V_DEFER_RESTORE BIT(TIF_RISCV_V_DEFER_RESTORE) 128 123 129 124 #endif /* _ASM_RISCV_THREAD_INFO_H */
+1
arch/s390/Kconfig
··· 206 206 select HAVE_DYNAMIC_FTRACE_WITH_REGS 207 207 select HAVE_EBPF_JIT if HAVE_MARCH_Z196_FEATURES 208 208 select HAVE_EFFICIENT_UNALIGNED_ACCESS 209 + select HAVE_GENERIC_TIF_BITS 209 210 select HAVE_GUP_FAST 210 211 select HAVE_FENTRY 211 212 select HAVE_FTRACE_GRAPH_FUNC
+16 -34
arch/s390/include/asm/thread_info.h
··· 56 56 57 57 /* 58 58 * thread information flags bit numbers 59 + * 60 + * Tell the generic TIF infrastructure which special bits s390 supports 59 61 */ 60 - #define TIF_NOTIFY_RESUME 0 /* callback before returning to user */ 61 - #define TIF_SIGPENDING 1 /* signal pending */ 62 - #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ 63 - #define TIF_NEED_RESCHED_LAZY 3 /* lazy rescheduling needed */ 64 - #define TIF_UPROBE 4 /* breakpointed or single-stepping */ 65 - #define TIF_PATCH_PENDING 5 /* pending live patching update */ 66 - #define TIF_ASCE_PRIMARY 6 /* primary asce is kernel asce */ 67 - #define TIF_NOTIFY_SIGNAL 7 /* signal notifications exist */ 68 - #define TIF_GUARDED_STORAGE 8 /* load guarded storage control block */ 69 - #define TIF_ISOLATE_BP_GUEST 9 /* Run KVM guests with isolated BP */ 70 - #define TIF_PER_TRAP 10 /* Need to handle PER trap on exit to usermode */ 71 - #define TIF_31BIT 16 /* 32bit process */ 72 - #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ 73 - #define TIF_RESTORE_SIGMASK 18 /* restore signal mask in do_signal() */ 74 - #define TIF_SINGLE_STEP 19 /* This task is single stepped */ 75 - #define TIF_BLOCK_STEP 20 /* This task is block stepped */ 76 - #define TIF_UPROBE_SINGLESTEP 21 /* This task is uprobe single stepped */ 77 - #define TIF_SYSCALL_TRACE 24 /* syscall trace active */ 78 - #define TIF_SYSCALL_AUDIT 25 /* syscall auditing active */ 79 - #define TIF_SECCOMP 26 /* secure computing */ 80 - #define TIF_SYSCALL_TRACEPOINT 27 /* syscall tracepoint instrumentation */ 62 + #define HAVE_TIF_NEED_RESCHED_LAZY 63 + #define HAVE_TIF_RESTORE_SIGMASK 81 64 82 - #define _TIF_NOTIFY_RESUME BIT(TIF_NOTIFY_RESUME) 83 - #define _TIF_SIGPENDING BIT(TIF_SIGPENDING) 84 - #define _TIF_NEED_RESCHED BIT(TIF_NEED_RESCHED) 85 - #define _TIF_NEED_RESCHED_LAZY BIT(TIF_NEED_RESCHED_LAZY) 86 - #define _TIF_UPROBE BIT(TIF_UPROBE) 87 - #define _TIF_PATCH_PENDING BIT(TIF_PATCH_PENDING) 65 + #include <asm-generic/thread_info_tif.h> 66 + 67 + /* Architecture specific bits */ 68 + #define TIF_ASCE_PRIMARY 16 /* primary asce is kernel asce */ 69 + #define TIF_GUARDED_STORAGE 17 /* load guarded storage control block */ 70 + #define TIF_ISOLATE_BP_GUEST 18 /* Run KVM guests with isolated BP */ 71 + #define TIF_PER_TRAP 19 /* Need to handle PER trap on exit to usermode */ 72 + #define TIF_31BIT 20 /* 32bit process */ 73 + #define TIF_SINGLE_STEP 21 /* This task is single stepped */ 74 + #define TIF_BLOCK_STEP 22 /* This task is block stepped */ 75 + #define TIF_UPROBE_SINGLESTEP 23 /* This task is uprobe single stepped */ 76 + 88 77 #define _TIF_ASCE_PRIMARY BIT(TIF_ASCE_PRIMARY) 89 - #define _TIF_NOTIFY_SIGNAL BIT(TIF_NOTIFY_SIGNAL) 90 78 #define _TIF_GUARDED_STORAGE BIT(TIF_GUARDED_STORAGE) 91 79 #define _TIF_ISOLATE_BP_GUEST BIT(TIF_ISOLATE_BP_GUEST) 92 80 #define _TIF_PER_TRAP BIT(TIF_PER_TRAP) 93 81 #define _TIF_31BIT BIT(TIF_31BIT) 94 - #define _TIF_MEMDIE BIT(TIF_MEMDIE) 95 - #define _TIF_RESTORE_SIGMASK BIT(TIF_RESTORE_SIGMASK) 96 82 #define _TIF_SINGLE_STEP BIT(TIF_SINGLE_STEP) 97 83 #define _TIF_BLOCK_STEP BIT(TIF_BLOCK_STEP) 98 84 #define _TIF_UPROBE_SINGLESTEP BIT(TIF_UPROBE_SINGLESTEP) 99 - #define _TIF_SYSCALL_TRACE BIT(TIF_SYSCALL_TRACE) 100 - #define _TIF_SYSCALL_AUDIT BIT(TIF_SYSCALL_AUDIT) 101 - #define _TIF_SECCOMP BIT(TIF_SECCOMP) 102 - #define _TIF_SYSCALL_TRACEPOINT BIT(TIF_SYSCALL_TRACEPOINT) 103 85 104 86 #endif /* _ASM_THREAD_INFO_H */
+1
arch/x86/Kconfig
··· 239 239 select HAVE_EFFICIENT_UNALIGNED_ACCESS 240 240 select HAVE_EISA if X86_32 241 241 select HAVE_EXIT_THREAD 242 + select HAVE_GENERIC_TIF_BITS 242 243 select HAVE_GUP_FAST 243 244 select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE 244 245 select HAVE_FTRACE_GRAPH_FUNC if HAVE_FUNCTION_GRAPH_TRACER
+30 -44
arch/x86/include/asm/thread_info.h
··· 80 80 #endif 81 81 82 82 /* 83 - * thread information flags 84 - * - these are process state flags that various assembly files 85 - * may need to access 83 + * Tell the generic TIF infrastructure which bits x86 supports 86 84 */ 87 - #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ 88 - #define TIF_SIGPENDING 2 /* signal pending */ 89 - #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 90 - #define TIF_NEED_RESCHED_LAZY 4 /* Lazy rescheduling needed */ 91 - #define TIF_SINGLESTEP 5 /* reenable singlestep on user return*/ 92 - #define TIF_SSBD 6 /* Speculative store bypass disable */ 93 - #define TIF_SPEC_IB 9 /* Indirect branch speculation mitigation */ 94 - #define TIF_SPEC_L1D_FLUSH 10 /* Flush L1D on mm switches (processes) */ 95 - #define TIF_USER_RETURN_NOTIFY 11 /* notify kernel of userspace return */ 96 - #define TIF_UPROBE 12 /* breakpointed or singlestepping */ 97 - #define TIF_PATCH_PENDING 13 /* pending live patching update */ 98 - #define TIF_NEED_FPU_LOAD 14 /* load FPU on return to userspace */ 99 - #define TIF_NOCPUID 15 /* CPUID is not accessible in userland */ 100 - #define TIF_NOTSC 16 /* TSC is not accessible in userland */ 101 - #define TIF_NOTIFY_SIGNAL 17 /* signal notifications exist */ 102 - #define TIF_MEMDIE 20 /* is terminating due to OOM killer */ 103 - #define TIF_POLLING_NRFLAG 21 /* idle is polling for TIF_NEED_RESCHED */ 85 + #define HAVE_TIF_NEED_RESCHED_LAZY 86 + #define HAVE_TIF_POLLING_NRFLAG 87 + #define HAVE_TIF_SINGLESTEP 88 + 89 + #include <asm-generic/thread_info_tif.h> 90 + 91 + /* Architecture specific TIF space starts at 16 */ 92 + #define TIF_SSBD 16 /* Speculative store bypass disable */ 93 + #define TIF_SPEC_IB 17 /* Indirect branch speculation mitigation */ 94 + #define TIF_SPEC_L1D_FLUSH 18 /* Flush L1D on mm switches (processes) */ 95 + #define TIF_NEED_FPU_LOAD 19 /* load FPU on return to userspace */ 96 + #define TIF_NOCPUID 20 /* CPUID is not accessible in userland */ 97 + #define TIF_NOTSC 21 /* TSC is not accessible in userland */ 104 98 #define TIF_IO_BITMAP 22 /* uses I/O bitmap */ 105 99 #define TIF_SPEC_FORCE_UPDATE 23 /* Force speculation MSR update in context switch */ 106 100 #define TIF_FORCED_TF 24 /* true if TF in eflags artificially */ 107 - #define TIF_BLOCKSTEP 25 /* set when we want DEBUGCTLMSR_BTF */ 101 + #define TIF_SINGLESTEP 25 /* reenable singlestep on user return*/ 102 + #define TIF_BLOCKSTEP 26 /* set when we want DEBUGCTLMSR_BTF */ 108 103 #define TIF_LAZY_MMU_UPDATES 27 /* task is updating the mmu lazily */ 109 - #define TIF_ADDR32 29 /* 32-bit address space on 64 bits */ 104 + #define TIF_ADDR32 28 /* 32-bit address space on 64 bits */ 110 105 111 - #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 112 - #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 113 - #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 114 - #define _TIF_NEED_RESCHED_LAZY (1 << TIF_NEED_RESCHED_LAZY) 115 - #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) 116 - #define _TIF_SSBD (1 << TIF_SSBD) 117 - #define _TIF_SPEC_IB (1 << TIF_SPEC_IB) 118 - #define _TIF_SPEC_L1D_FLUSH (1 << TIF_SPEC_L1D_FLUSH) 119 - #define _TIF_USER_RETURN_NOTIFY (1 << TIF_USER_RETURN_NOTIFY) 120 - #define _TIF_UPROBE (1 << TIF_UPROBE) 121 - #define _TIF_PATCH_PENDING (1 << TIF_PATCH_PENDING) 122 - #define _TIF_NEED_FPU_LOAD (1 << TIF_NEED_FPU_LOAD) 123 - #define _TIF_NOCPUID (1 << TIF_NOCPUID) 124 - #define _TIF_NOTSC (1 << TIF_NOTSC) 125 - #define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL) 126 - #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) 127 - #define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP) 128 - #define _TIF_SPEC_FORCE_UPDATE (1 << TIF_SPEC_FORCE_UPDATE) 129 - #define _TIF_FORCED_TF (1 << TIF_FORCED_TF) 130 - #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP) 131 - #define _TIF_LAZY_MMU_UPDATES (1 << TIF_LAZY_MMU_UPDATES) 132 - #define _TIF_ADDR32 (1 << TIF_ADDR32) 106 + #define _TIF_SSBD BIT(TIF_SSBD) 107 + #define _TIF_SPEC_IB BIT(TIF_SPEC_IB) 108 + #define _TIF_SPEC_L1D_FLUSH BIT(TIF_SPEC_L1D_FLUSH) 109 + #define _TIF_NEED_FPU_LOAD BIT(TIF_NEED_FPU_LOAD) 110 + #define _TIF_NOCPUID BIT(TIF_NOCPUID) 111 + #define _TIF_NOTSC BIT(TIF_NOTSC) 112 + #define _TIF_IO_BITMAP BIT(TIF_IO_BITMAP) 113 + #define _TIF_SPEC_FORCE_UPDATE BIT(TIF_SPEC_FORCE_UPDATE) 114 + #define _TIF_FORCED_TF BIT(TIF_FORCED_TF) 115 + #define _TIF_BLOCKSTEP BIT(TIF_BLOCKSTEP) 116 + #define _TIF_SINGLESTEP BIT(TIF_SINGLESTEP) 117 + #define _TIF_LAZY_MMU_UPDATES BIT(TIF_LAZY_MMU_UPDATES) 118 + #define _TIF_ADDR32 BIT(TIF_ADDR32) 133 119 134 120 /* flags to check in __switch_to() */ 135 121 #define _TIF_WORK_CTXSW_BASE \
+48
include/asm-generic/thread_info_tif.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef _ASM_GENERIC_THREAD_INFO_TIF_H_ 3 + #define _ASM_GENERIC_THREAD_INFO_TIF_H_ 4 + 5 + #include <vdso/bits.h> 6 + 7 + /* Bits 16-31 are reserved for architecture specific purposes */ 8 + 9 + #define TIF_NOTIFY_RESUME 0 // callback before returning to user 10 + #define _TIF_NOTIFY_RESUME BIT(TIF_NOTIFY_RESUME) 11 + 12 + #define TIF_SIGPENDING 1 // signal pending 13 + #define _TIF_SIGPENDING BIT(TIF_SIGPENDING) 14 + 15 + #define TIF_NOTIFY_SIGNAL 2 // signal notifications exist 16 + #define _TIF_NOTIFY_SIGNAL BIT(TIF_NOTIFY_SIGNAL) 17 + 18 + #define TIF_MEMDIE 3 // is terminating due to OOM killer 19 + #define _TIF_MEMDIE BIT(TIF_MEMDIE) 20 + 21 + #define TIF_NEED_RESCHED 4 // rescheduling necessary 22 + #define _TIF_NEED_RESCHED BIT(TIF_NEED_RESCHED) 23 + 24 + #ifdef HAVE_TIF_NEED_RESCHED_LAZY 25 + # define TIF_NEED_RESCHED_LAZY 5 // Lazy rescheduling needed 26 + # define _TIF_NEED_RESCHED_LAZY BIT(TIF_NEED_RESCHED_LAZY) 27 + #endif 28 + 29 + #ifdef HAVE_TIF_POLLING_NRFLAG 30 + # define TIF_POLLING_NRFLAG 6 // idle is polling for TIF_NEED_RESCHED 31 + # define _TIF_POLLING_NRFLAG BIT(TIF_POLLING_NRFLAG) 32 + #endif 33 + 34 + #define TIF_USER_RETURN_NOTIFY 7 // notify kernel of userspace return 35 + #define _TIF_USER_RETURN_NOTIFY BIT(TIF_USER_RETURN_NOTIFY) 36 + 37 + #define TIF_UPROBE 8 // breakpointed or singlestepping 38 + #define _TIF_UPROBE BIT(TIF_UPROBE) 39 + 40 + #define TIF_PATCH_PENDING 9 // pending live patching update 41 + #define _TIF_PATCH_PENDING BIT(TIF_PATCH_PENDING) 42 + 43 + #ifdef HAVE_TIF_RESTORE_SIGMASK 44 + # define TIF_RESTORE_SIGMASK 10 // Restore signal mask in do_signal() */ 45 + # define _TIF_RESTORE_SIGMASK BIT(TIF_RESTORE_SIGMASK) 46 + #endif 47 + 48 + #endif /* _ASM_GENERIC_THREAD_INFO_TIF_H_ */