First Support on Ginger and OMAP TI
[linux-ginger.git] / arch / m68k / include / asm / thread_info_mm.h
blobb6da3882be9bc8e78261648cafcd0cbb4ba0ec8c
1 #ifndef _ASM_M68K_THREAD_INFO_H
2 #define _ASM_M68K_THREAD_INFO_H
4 #ifndef ASM_OFFSETS_C
5 #include <asm/asm-offsets.h>
6 #endif
7 #include <asm/current.h>
8 #include <asm/types.h>
9 #include <asm/page.h>
11 struct thread_info {
12 struct task_struct *task; /* main task structure */
13 unsigned long flags;
14 struct exec_domain *exec_domain; /* execution domain */
15 int preempt_count; /* 0 => preemptable, <0 => BUG */
16 __u32 cpu; /* should always be 0 on m68k */
17 struct restart_block restart_block;
20 #define PREEMPT_ACTIVE 0x4000000
22 #define INIT_THREAD_INFO(tsk) \
23 { \
24 .task = &tsk, \
25 .exec_domain = &default_exec_domain, \
26 .preempt_count = INIT_PREEMPT_COUNT, \
27 .restart_block = { \
28 .fn = do_no_restart_syscall, \
29 }, \
32 /* THREAD_SIZE should be 8k, so handle differently for 4k and 8k machines */
33 #define THREAD_SIZE_ORDER (13 - PAGE_SHIFT)
35 #define init_thread_info (init_task.thread.info)
36 #define init_stack (init_thread_union.stack)
38 #ifdef ASM_OFFSETS_C
39 #define task_thread_info(tsk) ((struct thread_info *) NULL)
40 #else
41 #define task_thread_info(tsk) ((struct thread_info *)((char *)tsk+TASK_TINFO))
42 #endif
44 #define task_stack_page(tsk) ((tsk)->stack)
45 #define current_thread_info() task_thread_info(current)
47 #define __HAVE_THREAD_FUNCTIONS
49 #define setup_thread_stack(p, org) ({ \
50 *(struct task_struct **)(p)->stack = (p); \
51 task_thread_info(p)->task = (p); \
54 #define end_of_stack(p) ((unsigned long *)(p)->stack + 1)
56 /* entry.S relies on these definitions!
57 * bits 0-7 are tested at every exception exit
58 * bits 8-15 are also tested at syscall exit
60 #define TIF_SIGPENDING 6 /* signal pending */
61 #define TIF_NEED_RESCHED 7 /* rescheduling necessary */
62 #define TIF_DELAYED_TRACE 14 /* single step a syscall */
63 #define TIF_SYSCALL_TRACE 15 /* syscall trace active */
64 #define TIF_MEMDIE 16
65 #define TIF_FREEZE 17 /* thread is freezing for suspend */
67 #endif /* _ASM_M68K_THREAD_INFO_H */