This source file includes following definitions.
- release_thread
- release_thread
1
2
3
4
5
6
7
8
9
10
11 #ifndef _ASM_MICROBLAZE_PROCESSOR_H
12 #define _ASM_MICROBLAZE_PROCESSOR_H
13
14 #include <asm/ptrace.h>
15 #include <asm/setup.h>
16 #include <asm/registers.h>
17 #include <asm/entry.h>
18 #include <asm/current.h>
19
20 # ifndef __ASSEMBLY__
21
22 extern const struct seq_operations cpuinfo_op;
23
24 # define cpu_relax() barrier()
25
26 #define task_pt_regs(tsk) \
27 (((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1)
28
29
30 void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp);
31
32 extern void ret_from_fork(void);
33 extern void ret_from_kernel_thread(void);
34
35 # endif
36
37 # ifndef CONFIG_MMU
38
39
40
41
42
43
44
45
46 # define TASK_SIZE (0x81000000 - 0x80000000)
47
48
49
50
51
52 # define TASK_UNMAPPED_BASE 0
53
54
55 struct task_struct;
56
57
58 struct thread_struct { };
59 # define INIT_THREAD { }
60
61
62 static inline void release_thread(struct task_struct *dead_task)
63 {
64 }
65
66 extern unsigned long get_wchan(struct task_struct *p);
67
68 # define KSTK_EIP(tsk) (0)
69 # define KSTK_ESP(tsk) (0)
70
71 # else
72
73
74
75
76
77 # define TASK_SIZE (CONFIG_KERNEL_START)
78
79
80
81
82
83 # define TASK_UNMAPPED_BASE (TASK_SIZE / 8 * 3)
84
85 # define THREAD_KSP 0
86
87 # ifndef __ASSEMBLY__
88
89
90
91
92 struct thread_struct {
93
94 unsigned long ksp;
95 unsigned long ksp_limit;
96 void *pgdir;
97 struct pt_regs *regs;
98 };
99
100 # define INIT_THREAD { \
101 .ksp = sizeof init_stack + (unsigned long)init_stack, \
102 .pgdir = swapper_pg_dir, \
103 }
104
105
106 static inline void release_thread(struct task_struct *dead_task)
107 {
108 }
109
110 unsigned long get_wchan(struct task_struct *p);
111
112
113 # define KERNEL_STACK_SIZE 0x2000
114
115
116 # define task_tos(task) ((unsigned long)(task) + KERNEL_STACK_SIZE)
117 # define task_regs(task) ((struct pt_regs *)task_tos(task) - 1)
118
119 # define task_pt_regs_plus_args(tsk) \
120 ((void *)task_pt_regs(tsk))
121
122 # define task_sp(task) (task_regs(task)->r1)
123 # define task_pc(task) (task_regs(task)->pc)
124
125 # define KSTK_EIP(task) (task_pc(task))
126 # define KSTK_ESP(task) (task_sp(task))
127
128
129 # define deactivate_mm(tsk, mm) do { } while (0)
130
131 # define STACK_TOP TASK_SIZE
132 # define STACK_TOP_MAX STACK_TOP
133
134 #ifdef CONFIG_DEBUG_FS
135 extern struct dentry *of_debugfs_root;
136 #endif
137
138 # endif
139 # endif
140 #endif