1
2
3
4
5
6
7
8 #ifndef _ASM_PROCESSOR_H
9 #define _ASM_PROCESSOR_H
10
11 #ifndef __ASSEMBLY__
12
13 #include <asm/mem-layout.h>
14 #include <asm/registers.h>
15 #include <asm/hexagon_vm.h>
16
17
18 struct task_struct;
19
20 extern void start_thread(struct pt_regs *, unsigned long, unsigned long);
21
22
23
24
25
26 struct thread_struct {
27 void *switch_sp;
28 };
29
30
31
32
33
34
35
36 #define INIT_THREAD { \
37 }
38
39 #define cpu_relax() __vmyield()
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE/3))
55
56
57 #define task_pt_regs(task) \
58 ((struct pt_regs *)(task_stack_page(task) + THREAD_SIZE) - 1)
59
60 #define KSTK_EIP(tsk) (pt_elr(task_pt_regs(tsk)))
61 #define KSTK_ESP(tsk) (pt_psp(task_pt_regs(tsk)))
62
63
64 extern void release_thread(struct task_struct *dead_task);
65
66
67 extern unsigned long get_wchan(struct task_struct *p);
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83 struct hexagon_switch_stack {
84 union {
85 struct {
86 unsigned long r16;
87 unsigned long r17;
88 };
89 unsigned long long r1716;
90 };
91 union {
92 struct {
93 unsigned long r18;
94 unsigned long r19;
95 };
96 unsigned long long r1918;
97 };
98 union {
99 struct {
100 unsigned long r20;
101 unsigned long r21;
102 };
103 unsigned long long r2120;
104 };
105 union {
106 struct {
107 unsigned long r22;
108 unsigned long r23;
109 };
110 unsigned long long r2322;
111 };
112 union {
113 struct {
114 unsigned long r24;
115 unsigned long r25;
116 };
117 unsigned long long r2524;
118 };
119 union {
120 struct {
121 unsigned long r26;
122 unsigned long r27;
123 };
124 unsigned long long r2726;
125 };
126
127 unsigned long fp;
128 unsigned long lr;
129 };
130
131 #endif
132
133 #endif