This source file includes following definitions.
- release_thread
1
2
3
4 #ifndef __ASM_CSKY_PROCESSOR_H
5 #define __ASM_CSKY_PROCESSOR_H
6
7 #include <linux/bitops.h>
8 #include <asm/segment.h>
9 #include <asm/ptrace.h>
10 #include <asm/current.h>
11 #include <asm/cache.h>
12 #include <abi/reg_ops.h>
13 #include <abi/regdef.h>
14 #include <abi/switch_context.h>
15 #ifdef CONFIG_CPU_HAS_FPU
16 #include <abi/fpu.h>
17 #endif
18
19 struct cpuinfo_csky {
20 unsigned long asid_cache;
21 } __aligned(SMP_CACHE_BYTES);
22
23 extern struct cpuinfo_csky cpu_data[];
24
25
26
27
28
29
30
31 #define TASK_SIZE 0x7fff8000UL
32
33 #ifdef __KERNEL__
34 #define STACK_TOP TASK_SIZE
35 #define STACK_TOP_MAX STACK_TOP
36 #endif
37
38
39
40
41 #define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
42
43 struct thread_struct {
44 unsigned long ksp;
45 unsigned long sr;
46 unsigned long trap_no;
47
48
49 struct user_fp __aligned(16) user_fp;
50 };
51
52 #define INIT_THREAD { \
53 .ksp = sizeof(init_stack) + (unsigned long) &init_stack, \
54 .sr = DEFAULT_PSR_VALUE, \
55 }
56
57
58
59
60
61
62
63 #define start_thread(_regs, _pc, _usp) \
64 do { \
65 set_fs(USER_DS); \
66 (_regs)->pc = (_pc); \
67 (_regs)->regs[1] = 0; \
68 (_regs)->regs[2] = 0; \
69 (_regs)->regs[3] = 0; \
70 (_regs)->sr &= ~PS_S; \
71 (_regs)->usp = (_usp); \
72 } while (0)
73
74
75 struct task_struct;
76
77
78 static inline void release_thread(struct task_struct *dead_task)
79 {
80 }
81
82
83 #define prepare_to_copy(tsk) do { } while (0)
84
85 extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
86
87 #define copy_segments(tsk, mm) do { } while (0)
88 #define release_segments(mm) do { } while (0)
89 #define forget_segments() do { } while (0)
90
91 extern unsigned long thread_saved_pc(struct task_struct *tsk);
92
93 unsigned long get_wchan(struct task_struct *p);
94
95 #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc)
96 #define KSTK_ESP(tsk) (task_pt_regs(tsk)->usp)
97
98 #define task_pt_regs(p) \
99 ((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)
100
101 #define cpu_relax() barrier()
102
103 #endif