diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /arch/sh/include/asm/thread_info.h | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/sh/include/asm/thread_info.h')
-rw-r--r-- | arch/sh/include/asm/thread_info.h | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index bdeb9d46d17d..55a36fef6875 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h | |||
@@ -19,6 +19,7 @@ struct thread_info { | |||
19 | struct task_struct *task; /* main task structure */ | 19 | struct task_struct *task; /* main task structure */ |
20 | struct exec_domain *exec_domain; /* execution domain */ | 20 | struct exec_domain *exec_domain; /* execution domain */ |
21 | unsigned long flags; /* low level flags */ | 21 | unsigned long flags; /* low level flags */ |
22 | __u32 status; /* thread synchronous flags */ | ||
22 | __u32 cpu; | 23 | __u32 cpu; |
23 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | 24 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
24 | mm_segment_t addr_limit; /* thread address space */ | 25 | mm_segment_t addr_limit; /* thread address space */ |
@@ -50,6 +51,7 @@ struct thread_info { | |||
50 | .task = &tsk, \ | 51 | .task = &tsk, \ |
51 | .exec_domain = &default_exec_domain, \ | 52 | .exec_domain = &default_exec_domain, \ |
52 | .flags = 0, \ | 53 | .flags = 0, \ |
54 | .status = 0, \ | ||
53 | .cpu = 0, \ | 55 | .cpu = 0, \ |
54 | .preempt_count = INIT_PREEMPT_COUNT, \ | 56 | .preempt_count = INIT_PREEMPT_COUNT, \ |
55 | .addr_limit = KERNEL_DS, \ | 57 | .addr_limit = KERNEL_DS, \ |
@@ -91,14 +93,16 @@ static inline struct thread_info *current_thread_info(void) | |||
91 | 93 | ||
92 | #define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT) | 94 | #define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT) |
93 | 95 | ||
94 | #else /* THREAD_SHIFT < PAGE_SHIFT */ | 96 | #endif |
95 | |||
96 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | ||
97 | 97 | ||
98 | extern struct thread_info *alloc_thread_info(struct task_struct *tsk); | 98 | extern struct thread_info *alloc_thread_info(struct task_struct *tsk); |
99 | extern void free_thread_info(struct thread_info *ti); | 99 | extern void free_thread_info(struct thread_info *ti); |
100 | extern void arch_task_cache_init(void); | ||
101 | #define arch_task_cache_init arch_task_cache_init | ||
102 | extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); | ||
103 | extern void init_thread_xstate(void); | ||
100 | 104 | ||
101 | #endif /* THREAD_SHIFT < PAGE_SHIFT */ | 105 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR |
102 | 106 | ||
103 | #endif /* __ASSEMBLY__ */ | 107 | #endif /* __ASSEMBLY__ */ |
104 | 108 | ||
@@ -111,13 +115,11 @@ extern void free_thread_info(struct thread_info *ti); | |||
111 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 115 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
112 | #define TIF_SIGPENDING 1 /* signal pending */ | 116 | #define TIF_SIGPENDING 1 /* signal pending */ |
113 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 117 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
114 | #define TIF_RESTORE_SIGMASK 3 /* restore signal mask in do_signal() */ | ||
115 | #define TIF_SINGLESTEP 4 /* singlestepping active */ | 118 | #define TIF_SINGLESTEP 4 /* singlestepping active */ |
116 | #define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */ | 119 | #define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */ |
117 | #define TIF_SECCOMP 6 /* secure computing */ | 120 | #define TIF_SECCOMP 6 /* secure computing */ |
118 | #define TIF_NOTIFY_RESUME 7 /* callback before returning to user */ | 121 | #define TIF_NOTIFY_RESUME 7 /* callback before returning to user */ |
119 | #define TIF_SYSCALL_TRACEPOINT 8 /* for ftrace syscall instrumentation */ | 122 | #define TIF_SYSCALL_TRACEPOINT 8 /* for ftrace syscall instrumentation */ |
120 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | ||
121 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 123 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
122 | #define TIF_MEMDIE 18 | 124 | #define TIF_MEMDIE 18 |
123 | #define TIF_FREEZE 19 /* Freezing for suspend */ | 125 | #define TIF_FREEZE 19 /* Freezing for suspend */ |
@@ -125,13 +127,11 @@ extern void free_thread_info(struct thread_info *ti); | |||
125 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 127 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
126 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 128 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
127 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 129 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
128 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | ||
129 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 130 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
130 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 131 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
131 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 132 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
132 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 133 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
133 | #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) | 134 | #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) |
134 | #define _TIF_USEDFPU (1 << TIF_USEDFPU) | ||
135 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 135 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
136 | #define _TIF_FREEZE (1 << TIF_FREEZE) | 136 | #define _TIF_FREEZE (1 << TIF_FREEZE) |
137 | 137 | ||
@@ -149,13 +149,33 @@ extern void free_thread_info(struct thread_info *ti); | |||
149 | /* work to do on any return to u-space */ | 149 | /* work to do on any return to u-space */ |
150 | #define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \ | 150 | #define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \ |
151 | _TIF_NEED_RESCHED | _TIF_SYSCALL_AUDIT | \ | 151 | _TIF_NEED_RESCHED | _TIF_SYSCALL_AUDIT | \ |
152 | _TIF_SINGLESTEP | _TIF_RESTORE_SIGMASK | \ | 152 | _TIF_SINGLESTEP | _TIF_NOTIFY_RESUME | \ |
153 | _TIF_NOTIFY_RESUME | _TIF_SYSCALL_TRACEPOINT) | 153 | _TIF_SYSCALL_TRACEPOINT) |
154 | 154 | ||
155 | /* work to do on interrupt/exception return */ | 155 | /* work to do on interrupt/exception return */ |
156 | #define _TIF_WORK_MASK (_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \ | 156 | #define _TIF_WORK_MASK (_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \ |
157 | _TIF_SYSCALL_AUDIT | _TIF_SINGLESTEP)) | 157 | _TIF_SYSCALL_AUDIT | _TIF_SINGLESTEP)) |
158 | 158 | ||
159 | /* | ||
160 | * Thread-synchronous status. | ||
161 | * | ||
162 | * This is different from the flags in that nobody else | ||
163 | * ever touches our thread-synchronous status, so we don't | ||
164 | * have to worry about atomic accesses. | ||
165 | */ | ||
166 | #define TS_RESTORE_SIGMASK 0x0001 /* restore signal mask in do_signal() */ | ||
167 | #define TS_USEDFPU 0x0002 /* FPU used by this task this quantum */ | ||
168 | |||
169 | #ifndef __ASSEMBLY__ | ||
170 | #define HAVE_SET_RESTORE_SIGMASK 1 | ||
171 | static inline void set_restore_sigmask(void) | ||
172 | { | ||
173 | struct thread_info *ti = current_thread_info(); | ||
174 | ti->status |= TS_RESTORE_SIGMASK; | ||
175 | set_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags); | ||
176 | } | ||
177 | #endif /* !__ASSEMBLY__ */ | ||
178 | |||
159 | #endif /* __KERNEL__ */ | 179 | #endif /* __KERNEL__ */ |
160 | 180 | ||
161 | #endif /* __ASM_SH_THREAD_INFO_H */ | 181 | #endif /* __ASM_SH_THREAD_INFO_H */ |