aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/thread_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/thread_info.h')
-rw-r--r--include/asm-powerpc/thread_info.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h
index d030f5ce39ad..b705c2a7651a 100644
--- a/include/asm-powerpc/thread_info.h
+++ b/include/asm-powerpc/thread_info.h
@@ -116,7 +116,6 @@ static inline struct thread_info *current_thread_info(void)
116#define TIF_SECCOMP 10 /* secure computing */ 116#define TIF_SECCOMP 10 /* secure computing */
117#define TIF_RESTOREALL 11 /* Restore all regs (implies NOERROR) */ 117#define TIF_RESTOREALL 11 /* Restore all regs (implies NOERROR) */
118#define TIF_NOERROR 12 /* Force successful syscall return */ 118#define TIF_NOERROR 12 /* Force successful syscall return */
119#define TIF_RESTORE_SIGMASK 13 /* Restore signal mask in do_signal */
120#define TIF_FREEZE 14 /* Freezing for suspend */ 119#define TIF_FREEZE 14 /* Freezing for suspend */
121#define TIF_RUNLATCH 15 /* Is the runlatch enabled? */ 120#define TIF_RUNLATCH 15 /* Is the runlatch enabled? */
122#define TIF_ABI_PENDING 16 /* 32/64 bit switch needed */ 121#define TIF_ABI_PENDING 16 /* 32/64 bit switch needed */
@@ -134,21 +133,33 @@ static inline struct thread_info *current_thread_info(void)
134#define _TIF_SECCOMP (1<<TIF_SECCOMP) 133#define _TIF_SECCOMP (1<<TIF_SECCOMP)
135#define _TIF_RESTOREALL (1<<TIF_RESTOREALL) 134#define _TIF_RESTOREALL (1<<TIF_RESTOREALL)
136#define _TIF_NOERROR (1<<TIF_NOERROR) 135#define _TIF_NOERROR (1<<TIF_NOERROR)
137#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
138#define _TIF_FREEZE (1<<TIF_FREEZE) 136#define _TIF_FREEZE (1<<TIF_FREEZE)
139#define _TIF_RUNLATCH (1<<TIF_RUNLATCH) 137#define _TIF_RUNLATCH (1<<TIF_RUNLATCH)
140#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) 138#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
141#define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP) 139#define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP)
142 140
143#define _TIF_USER_WORK_MASK ( _TIF_SIGPENDING | \ 141#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
144 _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK)
145#define _TIF_PERSYSCALL_MASK (_TIF_RESTOREALL|_TIF_NOERROR) 142#define _TIF_PERSYSCALL_MASK (_TIF_RESTOREALL|_TIF_NOERROR)
146 143
147/* Bits in local_flags */ 144/* Bits in local_flags */
148/* Don't move TLF_NAPPING without adjusting the code in entry_32.S */ 145/* Don't move TLF_NAPPING without adjusting the code in entry_32.S */
149#define TLF_NAPPING 0 /* idle thread enabled NAP mode */ 146#define TLF_NAPPING 0 /* idle thread enabled NAP mode */
147#define TLF_SLEEPING 1 /* suspend code enabled SLEEP mode */
148#define TLF_RESTORE_SIGMASK 2 /* Restore signal mask in do_signal */
150 149
151#define _TLF_NAPPING (1 << TLF_NAPPING) 150#define _TLF_NAPPING (1 << TLF_NAPPING)
151#define _TLF_SLEEPING (1 << TLF_SLEEPING)
152#define _TLF_RESTORE_SIGMASK (1 << TLF_RESTORE_SIGMASK)
153
154#ifndef __ASSEMBLY__
155#define HAVE_SET_RESTORE_SIGMASK 1
156static inline void set_restore_sigmask(void)
157{
158 struct thread_info *ti = current_thread_info();
159 ti->local_flags |= _TLF_RESTORE_SIGMASK;
160 set_bit(TIF_SIGPENDING, &ti->flags);
161}
162#endif /* !__ASSEMBLY__ */
152 163
153#endif /* __KERNEL__ */ 164#endif /* __KERNEL__ */
154 165