1
2
3
4
5
6
7
8
9
10
11
12 #ifndef _ASM_THREAD_INFO_H
13 #define _ASM_THREAD_INFO_H
14
15 #ifdef __KERNEL__
16
17 #ifndef __ASSEMBLY__
18
19 #include <asm/ptrace.h>
20 #include <asm/page.h>
21
22
23
24
25
26
27 #define NSWINS 8
28 struct thread_info {
29 unsigned long uwinmask;
30 struct task_struct *task;
31 unsigned long flags;
32 int cpu;
33 int preempt_count;
34
35 int softirq_count;
36 int hardirq_count;
37
38 u32 __unused;
39
40
41 unsigned long ksp;
42 unsigned long kpc;
43 unsigned long kpsr;
44 unsigned long kwim;
45
46
47
48
49 struct reg_window32 reg_window[NSWINS];
50 unsigned long rwbuf_stkptrs[NSWINS];
51 unsigned long w_saved;
52 };
53
54
55
56
57 #define INIT_THREAD_INFO(tsk) \
58 { \
59 .uwinmask = 0, \
60 .task = &tsk, \
61 .flags = 0, \
62 .cpu = 0, \
63 .preempt_count = INIT_PREEMPT_COUNT, \
64 }
65
66
67 register struct thread_info *current_thread_info_reg asm("g6");
68 #define current_thread_info() (current_thread_info_reg)
69
70
71
72
73 #define THREAD_SIZE_ORDER 1
74
75 #endif
76
77
78 #define THREAD_SIZE (2 * PAGE_SIZE)
79
80
81
82
83
84 #define TI_UWINMASK 0x00
85 #define TI_TASK 0x04
86 #define TI_FLAGS 0x08
87 #define TI_CPU 0x0c
88 #define TI_PREEMPT 0x10
89 #define TI_SOFTIRQ 0x14
90 #define TI_HARDIRQ 0x18
91 #define TI_KSP 0x20
92 #define TI_KPC 0x24
93 #define TI_KPSR 0x28
94 #define TI_KWIM 0x2c
95 #define TI_REG_WINDOW 0x30
96 #define TI_RWIN_SPTRS 0x230
97 #define TI_W_SAVED 0x250
98
99
100
101
102 #define TIF_SYSCALL_TRACE 0
103 #define TIF_NOTIFY_RESUME 1
104 #define TIF_SIGPENDING 2
105 #define TIF_NEED_RESCHED 3
106 #define TIF_RESTORE_SIGMASK 4
107 #define TIF_USEDFPU 8
108
109 #define TIF_POLLING_NRFLAG 9
110
111 #define TIF_MEMDIE 10
112
113
114 #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
115 #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
116 #define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
117 #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
118 #define _TIF_USEDFPU (1<<TIF_USEDFPU)
119 #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
120
121 #define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \
122 _TIF_SIGPENDING)
123
124 #define is_32bit_task() (1)
125
126 #endif
127
128 #endif