This source file includes following definitions.
- current_thread_info
1
2
3
4
5
6
7
8
9 #ifndef _ASM_MICROBLAZE_THREAD_INFO_H
10 #define _ASM_MICROBLAZE_THREAD_INFO_H
11
12 #ifdef __KERNEL__
13
14
15 #define THREAD_SHIFT 13
16 #define THREAD_SIZE (1 << THREAD_SHIFT)
17 #define THREAD_SIZE_ORDER 1
18
19 #ifndef __ASSEMBLY__
20 # include <linux/types.h>
21 # include <asm/processor.h>
22
23
24
25
26
27
28
29
30
31 struct cpu_context {
32 __u32 r1;
33 __u32 r2;
34
35 __u32 r13;
36 __u32 r14;
37 __u32 r15;
38 __u32 r16;
39 __u32 r17;
40 __u32 r18;
41
42 __u32 r19;
43 __u32 r20;
44 __u32 r21;
45 __u32 r22;
46 __u32 r23;
47 __u32 r24;
48 __u32 r25;
49 __u32 r26;
50 __u32 r27;
51 __u32 r28;
52 __u32 r29;
53 __u32 r30;
54
55
56 __u32 msr;
57 __u32 ear;
58 __u32 esr;
59 __u32 fsr;
60 };
61
62 typedef struct {
63 unsigned long seg;
64 } mm_segment_t;
65
66 struct thread_info {
67 struct task_struct *task;
68 unsigned long flags;
69 unsigned long status;
70 __u32 cpu;
71 __s32 preempt_count;
72 mm_segment_t addr_limit;
73
74 struct cpu_context cpu_context;
75 };
76
77
78
79
80 #define INIT_THREAD_INFO(tsk) \
81 { \
82 .task = &tsk, \
83 .flags = 0, \
84 .cpu = 0, \
85 .preempt_count = INIT_PREEMPT_COUNT, \
86 .addr_limit = KERNEL_DS, \
87 }
88
89
90 static inline struct thread_info *current_thread_info(void)
91 {
92 register unsigned long sp asm("r1");
93
94 return (struct thread_info *)(sp & ~(THREAD_SIZE-1));
95 }
96
97
98 #endif
99
100
101
102
103
104
105
106
107 #define TIF_SYSCALL_TRACE 0
108 #define TIF_NOTIFY_RESUME 1
109 #define TIF_SIGPENDING 2
110 #define TIF_NEED_RESCHED 3
111
112 #define TIF_SINGLESTEP 4
113 #define TIF_MEMDIE 6
114 #define TIF_SYSCALL_AUDIT 9
115 #define TIF_SECCOMP 10
116
117
118 #define TIF_POLLING_NRFLAG 16
119
120 #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
121 #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
122 #define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
123 #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
124 #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
125 #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
126 #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
127 #define _TIF_SECCOMP (1 << TIF_SECCOMP)
128
129
130 #define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \
131 _TIF_SYSCALL_AUDIT | _TIF_SECCOMP)
132
133
134 #define _TIF_WORK_MASK 0x0000FFFE
135
136
137 #define _TIF_ALLWORK_MASK 0x0000FFFF
138
139
140
141
142
143
144
145
146
147 #define TS_USEDFPU 0x0001
148
149 #endif
150 #endif