1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_M68K_THREAD_INFO_H
3 #define _ASM_M68K_THREAD_INFO_H
7 #include <asm/segment.h>
10 * On machines with 4k pages we default to an 8k thread size, though we
11 * allow a 4k with config option. Any other machine page size then
12 * the thread size must match the page size (which is 8k and larger here).
15 #ifdef CONFIG_4KSTACKS
16 #define THREAD_SIZE 4096
18 #define THREAD_SIZE 8192
21 #define THREAD_SIZE PAGE_SIZE
23 #define THREAD_SIZE_ORDER ((THREAD_SIZE / PAGE_SIZE) - 1)
28 struct task_struct *task; /* main task structure */
30 mm_segment_t addr_limit; /* thread address space */
31 int preempt_count; /* 0 => preemptable, <0 => BUG */
32 __u32 cpu; /* should always be 0 on m68k */
33 unsigned long tp_value; /* thread pointer */
35 #endif /* __ASSEMBLY__ */
37 #define INIT_THREAD_INFO(tsk) \
40 .addr_limit = KERNEL_DS, \
41 .preempt_count = INIT_PREEMPT_COUNT, \
44 #define init_stack (init_thread_union.stack)
47 /* how to get the thread information struct from C */
48 static inline struct thread_info *current_thread_info(void)
50 struct thread_info *ti;
52 "move.l %%sp, %0 \n\t"
55 : "di" (~(THREAD_SIZE-1))
61 #define init_thread_info (init_thread_union.thread_info)
63 /* entry.S relies on these definitions!
64 * bits 0-7 are tested at every exception exit
65 * bits 8-15 are also tested at syscall exit
67 #define TIF_NOTIFY_RESUME 5 /* callback before returning to user */
68 #define TIF_SIGPENDING 6 /* signal pending */
69 #define TIF_NEED_RESCHED 7 /* rescheduling necessary */
70 #define TIF_DELAYED_TRACE 14 /* single step a syscall */
71 #define TIF_SYSCALL_TRACE 15 /* syscall trace active */
72 #define TIF_MEMDIE 16 /* is terminating due to OOM killer */
73 #define TIF_RESTORE_SIGMASK 18 /* restore signal mask in do_signal */
75 #endif /* _ASM_M68K_THREAD_INFO_H */