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, 0, 0, 0, 0, 0, 0, \
62 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, 0, 0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105 unsigned int thr_npc;
106 unsigned int thr_y;
107 unsigned int thr_globals[8];
108 unsigned int thr_outs[8];
109 };
110
111
112
113
114
115
116 extern inline void start_bh_atomic(void)
117 {
118 unsigned long dummy, psr;
119 __asm__ __volatile__("rd %%psr, %2\n\t"
120 "wr %2, 0x20, %%psr\n\t"
121 "ld %1,%0\n\t"
122 "add %0,1,%0\n\t"
123 "st %0,%1\n\t"
124 "wr %2, 0x0, %%psr\n\t"
125 : "=r" (dummy), "=m" (intr_count)
126 : "0" (0), "r" (psr=0));
127 }
128
129 extern inline void end_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 "sub %0,1,%0\n\t"
136 "st %0,%1\n\t"
137 "wr %2, 0x0, %2\n\t"
138 : "=r" (dummy), "=m" (intr_count)
139 : "0" (0), "r" (psr=0));
140 }
141
142 #endif
143