]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/asm-parisc/thread_info.h
Merge commit 'v2.6.27-rc1' into for-linus
[mirror_ubuntu-bionic-kernel.git] / include / asm-parisc / thread_info.h
CommitLineData
1da177e4
LT
1#ifndef _ASM_PARISC_THREAD_INFO_H
2#define _ASM_PARISC_THREAD_INFO_H
3
4#ifdef __KERNEL__
5
6#ifndef __ASSEMBLY__
7#include <asm/processor.h>
8
9struct thread_info {
10 struct task_struct *task; /* main task structure */
11 struct exec_domain *exec_domain;/* execution domain */
12 unsigned long flags; /* thread_info flags (see TIF_*) */
13 mm_segment_t addr_limit; /* user-level address space limit */
14 __u32 cpu; /* current CPU */
dcd497f9 15 int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */
1da177e4
LT
16 struct restart_block restart_block;
17};
18
19#define INIT_THREAD_INFO(tsk) \
20{ \
21 .task = &tsk, \
22 .exec_domain = &default_exec_domain, \
23 .flags = 0, \
24 .cpu = 0, \
25 .addr_limit = KERNEL_DS, \
26 .preempt_count = 1, \
27 .restart_block = { \
28 .fn = do_no_restart_syscall \
29 } \
30}
31
32#define init_thread_info (init_thread_union.thread_info)
33#define init_stack (init_thread_union.stack)
34
35/* thread information allocation */
36
b69c49b7 37#define THREAD_SIZE_ORDER 2
1da177e4
LT
38/* Be sure to hunt all references to this down when you change the size of
39 * the kernel stack */
b69c49b7
FT
40#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
41#define THREAD_SHIFT (PAGE_SHIFT + THREAD_SIZE_ORDER)
1da177e4
LT
42
43/* how to get the thread information struct from C */
44#define current_thread_info() ((struct thread_info *)mfctl(30))
45
46#endif /* !__ASSEMBLY */
47
50a34dbd
KM
48#define PREEMPT_ACTIVE_BIT 28
49#define PREEMPT_ACTIVE (1 << PREEMPT_ACTIVE_BIT)
1da177e4
LT
50
51/*
52 * thread information flags
53 */
54#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
a583f1b5
SE
55#define TIF_SIGPENDING 1 /* signal pending */
56#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
57#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling TIF_NEED_RESCHED */
58#define TIF_32BIT 4 /* 32 bit binary */
59#define TIF_MEMDIE 5
60#define TIF_RESTORE_SIGMASK 6 /* restore saved signal mask */
1da177e4
LT
61
62#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
1da177e4
LT
63#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
64#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
65#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
66#define _TIF_32BIT (1 << TIF_32BIT)
4650f0a5 67#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
1da177e4 68
a583f1b5 69#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | \
4650f0a5 70 _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK)
1da177e4
LT
71
72#endif /* __KERNEL__ */
73
74#endif /* _ASM_PARISC_THREAD_INFO_H */