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 MCA_bus 0
14
15
16
17
18
19 #define wp_works_ok 1
20
21
22
23
24
25
26
27 #define TASK_SIZE (0xc0000000UL)
28
29
30
31
32 #define IO_BITMAP_SIZE 32
33
34
35
36
37
38
39 struct thread_struct {
40 unsigned long uwindows;
41 unsigned long wim;
42 unsigned long w_saved;
43 unsigned long ksp;
44 unsigned long usp;
45 unsigned long psr;
46 unsigned long reg_window[16*24];
47 unsigned long cr3;
48 unsigned int pcc;
49 unsigned int asn;
50 unsigned long unique;
51 unsigned long flags;
52 unsigned long res1, res2;
53 unsigned long pc;
54 unsigned long npc;
55
56
57
58
59
60
61 unsigned long globl_regs[8];
62 unsigned long yreg;
63 unsigned long float_regs[64];
64 };
65
66 #define INIT_TSS { \
67 0, 0, 0, 0, 0, 0, \
68 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
69 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
70 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
71 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
72 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
73 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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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ame {
110 unsigned int thr_psr;
111 unsigned int thr_pc;
112 unsigned int thr_npc;
113 unsigned int thr_y;
114 unsigned int thr_globals[8];
115 unsigned int thr_outs[8];
116 };
117
118
119
120
121
122
123 extern inline void start_bh_atomic(void)
124 {
125 unsigned long dummy, psr;
126 __asm__ __volatile__("rd %%psr, %2\n\t"
127 "wr %2, 0x20, %%psr\n\t"
128 "ld %1,%0\n\t"
129 "add %0,1,%0\n\t"
130 "st %0,%1\n\t"
131 "wr %2, 0x0, %%psr\n\t"
132 : "=r" (dummy), "=m" (intr_count)
133 : "0" (0), "r" (psr=0));
134 }
135
136 extern inline void end_bh_atomic(void)
137 {
138 unsigned long dummy, psr;
139 __asm__ __volatile__("rd %%psr, %2\n\t"
140 "wr %2, 0x20, %%psr\n\t"
141 "ld %1,%0\n\t"
142 "sub %0,1,%0\n\t"
143 "st %0,%1\n\t"
144 "wr %2, 0x0, %%psr\n\t"
145 : "=r" (dummy), "=m" (intr_count)
146 : "0" (0), "r" (psr=0));
147 }
148
149 #endif
150