1 #ifndef _ASM_M68K_THREAD_INFO_H
2 #define _ASM_M68K_THREAD_INFO_H
8 * On machines with 4k pages we default to an 8k thread size, though we
9 * allow a 4k with config option. Any other machine page size then
10 * the thread size must match the page size (which is 8k and larger here).
13 #ifdef CONFIG_4KSTACKS
14 #define THREAD_SIZE 4096
16 #define THREAD_SIZE 8192
19 #define THREAD_SIZE PAGE_SIZE
21 #define THREAD_SIZE_ORDER ((THREAD_SIZE / PAGE_SIZE) - 1)
26 struct task_struct *task; /* main task structure */
28 struct exec_domain *exec_domain; /* execution domain */
29 int preempt_count; /* 0 => preemptable, <0 => BUG */
30 __u32 cpu; /* should always be 0 on m68k */
31 unsigned long tp_value; /* thread pointer */
32 struct restart_block restart_block;
34 #endif /* __ASSEMBLY__ */
36 #define PREEMPT_ACTIVE 0x4000000
38 #define INIT_THREAD_INFO(tsk) \
41 .exec_domain = &default_exec_domain, \
42 .preempt_count = INIT_PREEMPT_COUNT, \
44 .fn = do_no_restart_syscall, \
48 #define init_stack (init_thread_union.stack)
53 #include <asm/current.h>
57 #define task_thread_info(tsk) ((struct thread_info *) NULL)
59 #include <asm/asm-offsets.h>
60 #define task_thread_info(tsk) ((struct thread_info *)((char *)tsk+TASK_TINFO))
63 #define init_thread_info (init_task.thread.info)
64 #define task_stack_page(tsk) ((tsk)->stack)
65 #define current_thread_info() task_thread_info(current)
67 #define __HAVE_THREAD_FUNCTIONS
69 #define setup_thread_stack(p, org) ({ \
70 *(struct task_struct **)(p)->stack = (p); \
71 task_thread_info(p)->task = (p); \
74 #define end_of_stack(p) ((unsigned long *)(p)->stack + 1)
76 #else /* !CONFIG_MMU */
79 /* how to get the thread information struct from C */
80 static inline struct thread_info *current_thread_info(void)
82 struct thread_info *ti;
84 "move.l %%sp, %0 \n\t"
87 : "di" (~(THREAD_SIZE-1))
93 #define init_thread_info (init_thread_union.thread_info)
95 #endif /* CONFIG_MMU */
97 /* entry.S relies on these definitions!
98 * bits 0-7 are tested at every exception exit
99 * bits 8-15 are also tested at syscall exit
101 #define TIF_SIGPENDING 6 /* signal pending */
102 #define TIF_NEED_RESCHED 7 /* rescheduling necessary */
103 #define TIF_DELAYED_TRACE 14 /* single step a syscall */
104 #define TIF_SYSCALL_TRACE 15 /* syscall trace active */
105 #define TIF_MEMDIE 16 /* is terminating due to OOM killer */
106 #define TIF_FREEZE 17 /* thread is freezing for suspend */
107 #define TIF_RESTORE_SIGMASK 18 /* restore signal mask in do_signal */
109 #endif /* _ASM_M68K_THREAD_INFO_H */