Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _ASM_M68K_THREAD_INFO_H |
| 2 | #define _ASM_M68K_THREAD_INFO_H |
| 3 | |
| 4 | #include <asm/types.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | #include <asm/page.h> |
| 6 | |
| 7 | struct thread_info { |
| 8 | struct task_struct *task; /* main task structure */ |
Roman Zippel | 3b66a1e | 2005-11-13 16:06:59 -0800 | [diff] [blame] | 9 | unsigned long flags; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | struct exec_domain *exec_domain; /* execution domain */ |
Jesper Juhl | dcd497f | 2005-06-23 00:09:07 -0700 | [diff] [blame] | 11 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | __u32 cpu; /* should always be 0 on m68k */ |
| 13 | struct restart_block restart_block; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | }; |
| 15 | |
| 16 | #define PREEMPT_ACTIVE 0x4000000 |
| 17 | |
| 18 | #define INIT_THREAD_INFO(tsk) \ |
| 19 | { \ |
| 20 | .task = &tsk, \ |
| 21 | .exec_domain = &default_exec_domain, \ |
| 22 | .restart_block = { \ |
| 23 | .fn = do_no_restart_syscall, \ |
| 24 | }, \ |
| 25 | } |
| 26 | |
| 27 | /* THREAD_SIZE should be 8k, so handle differently for 4k and 8k machines */ |
FUJITA Tomonori | b69c49b | 2008-07-25 01:45:40 -0700 | [diff] [blame] | 28 | #define THREAD_SIZE_ORDER (13 - PAGE_SHIFT) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | |
Al Viro | abd0375 | 2005-11-13 16:06:58 -0800 | [diff] [blame] | 30 | #define init_thread_info (init_task.thread.info) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | #define init_stack (init_thread_union.stack) |
| 32 | |
Al Viro | abd0375 | 2005-11-13 16:06:58 -0800 | [diff] [blame] | 33 | #define task_thread_info(tsk) (&(tsk)->thread.info) |
Roman Zippel | f7e4217 | 2007-05-09 02:35:17 -0700 | [diff] [blame] | 34 | #define task_stack_page(tsk) ((tsk)->stack) |
Al Viro | abd0375 | 2005-11-13 16:06:58 -0800 | [diff] [blame] | 35 | #define current_thread_info() task_thread_info(current) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | |
| 37 | #define __HAVE_THREAD_FUNCTIONS |
| 38 | |
Al Viro | abd0375 | 2005-11-13 16:06:58 -0800 | [diff] [blame] | 39 | #define setup_thread_stack(p, org) ({ \ |
Roman Zippel | f7e4217 | 2007-05-09 02:35:17 -0700 | [diff] [blame] | 40 | *(struct task_struct **)(p)->stack = (p); \ |
Al Viro | abd0375 | 2005-11-13 16:06:58 -0800 | [diff] [blame] | 41 | task_thread_info(p)->task = (p); \ |
| 42 | }) |
| 43 | |
Roman Zippel | f7e4217 | 2007-05-09 02:35:17 -0700 | [diff] [blame] | 44 | #define end_of_stack(p) ((unsigned long *)(p)->stack + 1) |
Al Viro | abd0375 | 2005-11-13 16:06:58 -0800 | [diff] [blame] | 45 | |
Roman Zippel | 3b66a1e | 2005-11-13 16:06:59 -0800 | [diff] [blame] | 46 | /* entry.S relies on these definitions! |
| 47 | * bits 0-7 are tested at every exception exit |
| 48 | * bits 8-15 are also tested at syscall exit |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | */ |
Roman Zippel | 3b66a1e | 2005-11-13 16:06:59 -0800 | [diff] [blame] | 50 | #define TIF_SIGPENDING 6 /* signal pending */ |
| 51 | #define TIF_NEED_RESCHED 7 /* rescheduling necessary */ |
| 52 | #define TIF_DELAYED_TRACE 14 /* single step a syscall */ |
| 53 | #define TIF_SYSCALL_TRACE 15 /* syscall trace active */ |
| 54 | #define TIF_MEMDIE 16 |
Matt Helsley | 83224b0 | 2008-10-18 20:27:18 -0700 | [diff] [blame] | 55 | #define TIF_FREEZE 17 /* thread is freezing for suspend */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | |
| 57 | #endif /* _ASM_M68K_THREAD_INFO_H */ |