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