forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/arch/arm/include/asm/thread_info.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * arch/arm/include/asm/thread_info.h
34 *
45 * Copyright (C) 2002 Russell King.
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 */
107 #ifndef __ASM_ARM_THREAD_INFO_H
118 #define __ASM_ARM_THREAD_INFO_H
....@@ -49,11 +46,13 @@
4946 struct thread_info {
5047 unsigned long flags; /* low level flags */
5148 int preempt_count; /* 0 => preemptable, <0 => bug */
52
- int preempt_lazy_count; /* 0 => preemptable, <0 => bug */
5349 mm_segment_t addr_limit; /* address limit */
5450 struct task_struct *task; /* main task structure */
5551 __u32 cpu; /* cpu */
5652 __u32 cpu_domain; /* cpu domain */
53
+#ifdef CONFIG_STACKPROTECTOR_PER_TASK
54
+ unsigned long stack_canary;
55
+#endif
5756 struct cpu_context_save cpu_context; /* cpu context */
5857 __u32 syscall; /* syscall number */
5958 __u8 used_cp[16]; /* thread used copro */
....@@ -75,11 +74,6 @@
7574 .preempt_count = INIT_PREEMPT_COUNT, \
7675 .addr_limit = KERNEL_DS, \
7776 }
78
-
79
-/*
80
- * how to get the current stack pointer in C
81
- */
82
-register unsigned long current_stack_pointer asm ("sp");
8377
8478 /*
8579 * how to get the thread information struct from C
....@@ -132,31 +126,33 @@
132126 * thread information flags:
133127 * TIF_USEDFPU - FPU was used by this task this quantum (SMP)
134128 * TIF_POLLING_NRFLAG - true if poll_idle() is polling TIF_NEED_RESCHED
129
+ *
130
+ * Any bit in the range of 0..15 will cause do_work_pending() to be invoked.
135131 */
136132 #define TIF_SIGPENDING 0 /* signal pending */
137133 #define TIF_NEED_RESCHED 1 /* rescheduling necessary */
138134 #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */
139135 #define TIF_UPROBE 3 /* breakpointed or singlestepping */
140
-#define TIF_SYSCALL_TRACE 4 /* syscall trace active */
141
-#define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */
142
-#define TIF_SYSCALL_TRACEPOINT 6 /* syscall tracepoint instrumentation */
143
-#define TIF_SECCOMP 8 /* seccomp syscall filtering active */
144
-#define TIF_NEED_RESCHED_LAZY 7
136
+#define TIF_NOTIFY_SIGNAL 4 /* signal notifications exist */
145137
146
-#define TIF_NOHZ 12 /* in adaptive nohz mode */
147138 #define TIF_USING_IWMMXT 17
148139 #define TIF_MEMDIE 18 /* is terminating due to OOM killer */
149
-#define TIF_RESTORE_SIGMASK 20
140
+#define TIF_RESTORE_SIGMASK 19
141
+#define TIF_SYSCALL_TRACE 20 /* syscall trace active */
142
+#define TIF_SYSCALL_AUDIT 21 /* syscall auditing active */
143
+#define TIF_SYSCALL_TRACEPOINT 22 /* syscall tracepoint instrumentation */
144
+#define TIF_SECCOMP 23 /* seccomp syscall filtering active */
145
+
150146
151147 #define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
152148 #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
153149 #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
154
-#define _TIF_NEED_RESCHED_LAZY (1 << TIF_NEED_RESCHED_LAZY)
155150 #define _TIF_UPROBE (1 << TIF_UPROBE)
156151 #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
157152 #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
158153 #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
159154 #define _TIF_SECCOMP (1 << TIF_SECCOMP)
155
+#define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL)
160156 #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT)
161157
162158 /* Checks for any syscall work in entry-common.S */
....@@ -168,7 +164,7 @@
168164 */
169165 #define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
170166 _TIF_NOTIFY_RESUME | _TIF_UPROBE | \
171
- _TIF_NEED_RESCHED_LAZY)
167
+ _TIF_NOTIFY_SIGNAL)
172168
173169 #endif /* __KERNEL__ */
174170 #endif /* __ASM_ARM_THREAD_INFO_H */