This source file includes following definitions.
- start_bh_atomic
- end_bh_atomic
1
2
3
4
5
6 #ifndef __ASM_SPARC_PROCESSOR_H
7 #define __ASM_SPARC_PROCESSOR_H
8
9
10
11
12 #define EISA_bus 1
13 #define EISA_bus__is_a_macro
14 #define MCA_bus 0
15 #define MCA_bus__is_a_macro
16
17
18
19
20
21 #define wp_works_ok 1
22 #define wp_works_ok__is_a_macro
23
24
25
26
27
28
29
30 #define TASK_SIZE (0xC0000000UL)
31
32
33
34
35 #define IO_BITMAP_SIZE 32
36
37
38
39
40
41
42 struct thread_struct {
43 unsigned long uwindows;
44 unsigned long wim;
45 unsigned long w_saved;
46 unsigned long ksp;
47 unsigned long usp;
48 unsigned long psr;
49 unsigned long reg_window[16*24];
50 unsigned long cr3;
51 unsigned int pcc;
52 unsigned int asn;
53 unsigned long unique;
54 unsigned long flags;
55 unsigned long res1, res2;
56 unsigned long pc;
57 unsigned long npc;
58
59
60
61
62
63
64 unsigned long globl_regs[8];
65 unsigned long yreg;
66 unsigned long float_regs[64];
67 };
68
69 #define INIT_MMAP { &init_task, 0x0, 0x40000000, \
70 PAGE_SHARED , VM_READ | VM_WRITE | VM_EXEC }
71
72 #define INIT_TSS { \
73 0, 0, 0, 0, 0, 0, \
74 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
75 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
76 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
77 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
78 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
79 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
80 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
81 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
104 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, \
105 }
106
107
108
109
110
111
112
113
114
115 struct thread_frame {
116 unsigned int thr_psr;
117 unsigned int thr_pc;
118 unsigned int thr_npc;
119 unsigned int thr_y;
120 unsigned int thr_globals[8];
121 unsigned int thr_outs[8];
122 };
123
124
125
126
127
128
129 extern inline void start_bh_atomic(void)
130 {
131 unsigned long dummy, psr;
132 __asm__ __volatile__("rd %%psr, %2\n\t"
133 "wr %2, 0x20, %%psr\n\t"
134 "ld %1,%0\n\t"
135 "add %0,1,%0\n\t"
136 "st %0,%1\n\t"
137 "wr %2, 0x0, %%psr\n\t"
138 : "=r" (dummy), "=m" (intr_count)
139 : "0" (0), "r" (psr=0));
140 }
141
142 extern inline void end_bh_atomic(void)
143 {
144 unsigned long dummy, psr;
145 __asm__ __volatile__("rd %%psr, %2\n\t"
146 "wr %2, 0x20, %%psr\n\t"
147 "ld %1,%0\n\t"
148 "sub %0,1,%0\n\t"
149 "st %0,%1\n\t"
150 "wr %2, 0x0, %%psr\n\t"
151 : "=r" (dummy), "=m" (intr_count)
152 : "0" (0), "r" (psr=0));
153 }
154
155 #endif
156