0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef _ASM_THREAD_INFO_H
0014 #define _ASM_THREAD_INFO_H
0015
0016 #include <asm/page.h>
0017
0018 #ifdef CONFIG_16KSTACKS
0019 #define THREAD_SIZE_ORDER 1
0020 #else
0021 #define THREAD_SIZE_ORDER 0
0022 #endif
0023
0024 #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
0025 #define THREAD_SHIFT (PAGE_SHIFT << THREAD_SIZE_ORDER)
0026
0027 #ifndef __ASSEMBLY__
0028
0029 #include <linux/thread_info.h>
0030
0031
0032
0033
0034
0035
0036
0037
0038 struct thread_info {
0039 unsigned long flags;
0040 int preempt_count;
0041 struct task_struct *task;
0042 __u32 cpu;
0043 unsigned long thr_ptr;
0044 };
0045
0046
0047
0048
0049
0050
0051 #define INIT_THREAD_INFO(tsk) \
0052 { \
0053 .task = &tsk, \
0054 .flags = 0, \
0055 .cpu = 0, \
0056 .preempt_count = INIT_PREEMPT_COUNT, \
0057 }
0058
0059 static inline __attribute_const__ struct thread_info *current_thread_info(void)
0060 {
0061 register unsigned long sp asm("sp");
0062 return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
0063 }
0064
0065 #endif
0066
0067
0068
0069
0070
0071
0072
0073
0074 #define TIF_RESTORE_SIGMASK 0
0075 #define TIF_NOTIFY_RESUME 1
0076 #define TIF_SIGPENDING 2
0077 #define TIF_NEED_RESCHED 3
0078 #define TIF_SYSCALL_AUDIT 4
0079 #define TIF_NOTIFY_SIGNAL 5
0080 #define TIF_SYSCALL_TRACE 15
0081
0082 #define TIF_MEMDIE 16
0083 #define TIF_SYSCALL_TRACEPOINT 17
0084
0085 #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
0086 #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
0087 #define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
0088 #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
0089 #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
0090 #define _TIF_NOTIFY_SIGNAL (1<<TIF_NOTIFY_SIGNAL)
0091 #define _TIF_MEMDIE (1<<TIF_MEMDIE)
0092 #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT)
0093
0094
0095 #define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
0096 _TIF_NOTIFY_RESUME | _TIF_NOTIFY_SIGNAL)
0097
0098 #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_TRACEPOINT)
0099
0100
0101
0102
0103
0104
0105
0106 #endif