aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-um/thread_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-um/thread_info.h')
-rw-r--r--include/asm-um/thread_info.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h
index a10ea155907e..1feaaf148ef1 100644
--- a/include/asm-um/thread_info.h
+++ b/include/asm-um/thread_info.h
@@ -41,18 +41,17 @@ struct thread_info {
41#define init_thread_info (init_thread_union.thread_info) 41#define init_thread_info (init_thread_union.thread_info)
42#define init_stack (init_thread_union.stack) 42#define init_stack (init_thread_union.stack)
43 43
44#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
44/* how to get the thread information struct from C */ 45/* how to get the thread information struct from C */
45static inline struct thread_info *current_thread_info(void) 46static inline struct thread_info *current_thread_info(void)
46{ 47{
47 struct thread_info *ti; 48 struct thread_info *ti;
48 unsigned long mask = PAGE_SIZE * 49 unsigned long mask = THREAD_SIZE - 1;
49 (1 << CONFIG_KERNEL_STACK_ORDER) - 1; 50 ti = (struct thread_info *) (((unsigned long) &ti) & ~mask);
50 ti = (struct thread_info *) (((unsigned long) &ti) & ~mask);
51 return ti; 51 return ti;
52} 52}
53 53
54/* thread information allocation */ 54/* thread information allocation */
55#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
56#define alloc_thread_info(tsk) \ 55#define alloc_thread_info(tsk) \
57 ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) 56 ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL))
58#define free_thread_info(ti) kfree(ti) 57#define free_thread_info(ti) kfree(ti)
@@ -62,7 +61,7 @@ static inline struct thread_info *current_thread_info(void)
62 61
63#endif 62#endif
64 63
65#define PREEMPT_ACTIVE 0x4000000 64#define PREEMPT_ACTIVE 0x10000000
66 65
67#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 66#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
68#define TIF_SIGPENDING 1 /* signal pending */ 67#define TIF_SIGPENDING 1 /* signal pending */