aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2017-02-13 20:42:29 -0500
committerJiri Kosina <jkosina@suse.cz>2017-03-08 03:18:56 -0500
commit3a404842547c92e71127870a613319a29cdebe49 (patch)
tree054d17ba901fec5d3160612f6a56270dd932a420
parentaf085d9084b48530153f51e6cad19fd0b1a13ed7 (diff)
x86/entry: define _TIF_ALLWORK_MASK flags explicitly
The _TIF_ALLWORK_MASK macro automatically includes the least-significant 16 bits of the thread_info flags, which is less than obvious and tends to create confusion and surprises when reading or modifying the code. Define the flags explicitly. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Acked-by: Ingo Molnar <mingo@kernel.org> # for the x86 changes Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--arch/x86/include/asm/thread_info.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
index ad6f5eb07a95..207d0d981287 100644
--- a/arch/x86/include/asm/thread_info.h
+++ b/arch/x86/include/asm/thread_info.h
@@ -73,9 +73,6 @@ struct thread_info {
73 * thread information flags 73 * thread information flags
74 * - these are process state flags that various assembly files 74 * - these are process state flags that various assembly files
75 * may need to access 75 * may need to access
76 * - pending work-to-be-done flags are in LSW
77 * - other flags in MSW
78 * Warning: layout of LSW is hardcoded in entry.S
79 */ 76 */
80#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 77#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
81#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ 78#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */
@@ -103,8 +100,8 @@ struct thread_info {
103#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 100#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
104#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 101#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
105#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 102#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
106#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
107#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 103#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
104#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
108#define _TIF_SYSCALL_EMU (1 << TIF_SYSCALL_EMU) 105#define _TIF_SYSCALL_EMU (1 << TIF_SYSCALL_EMU)
109#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) 106#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
110#define _TIF_SECCOMP (1 << TIF_SECCOMP) 107#define _TIF_SECCOMP (1 << TIF_SECCOMP)
@@ -133,8 +130,10 @@ struct thread_info {
133 130
134/* work to do on any return to user space */ 131/* work to do on any return to user space */
135#define _TIF_ALLWORK_MASK \ 132#define _TIF_ALLWORK_MASK \
136 ((0x0000FFFF & ~_TIF_SECCOMP) | _TIF_SYSCALL_TRACEPOINT | \ 133 (_TIF_SYSCALL_TRACE | _TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \
137 _TIF_NOHZ) 134 _TIF_NEED_RESCHED | _TIF_SINGLESTEP | _TIF_SYSCALL_EMU | \
135 _TIF_SYSCALL_AUDIT | _TIF_USER_RETURN_NOTIFY | _TIF_UPROBE | \
136 _TIF_NOHZ | _TIF_SYSCALL_TRACEPOINT)
138 137
139/* flags to check in __switch_to() */ 138/* flags to check in __switch_to() */
140#define _TIF_WORK_CTXSW \ 139#define _TIF_WORK_CTXSW \