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 struct thread_struct {
29 unsigned long ksp;
30 unsigned long usp;
31 unsigned long cr3;
32 unsigned int pcc;
33 unsigned int asn;
34 unsigned long unique;
35 unsigned long flags;
36 unsigned long res1, res2;
37 unsigned long psr;
38 unsigned long pc;
39 unsigned long npc;
40
41
42
43
44
45
46 unsigned long globl_regs[8];
47 unsigned long reg_window[16*24];
48 unsigned long yreg;
49 unsigned long uwindows;
50 unsigned long float_regs[64];
51 };
52
53 #define INIT_TSS { \
54 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
55 0, 0, 0, 0, 0, 0, 0, 0, \
56 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
57 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
58 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
59 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
60 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
61 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, \
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, \
81 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
82 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
83 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
84 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, \
85 }
86
87
88
89
90
91
92 extern inline void start_bh_atomic(void)
93 {
94 unsigned long dummy, psr;
95 __asm__ __volatile__("rd %%psr, %2\n\t"
96 "wr %2, 0x20, %%psr\n\t"
97 "ld %1,%0\n\t"
98 "add %0,1,%0\n\t"
99 "st %0,%1\n\t"
100 "wr %2, 0x0, %%psr\n\t"
101 : "=r" (dummy), "=m" (intr_count)
102 : "0" (0), "r" (psr=0));
103 }
104
105 extern inline void end_bh_atomic(void)
106 {
107 unsigned long dummy, psr;
108 __asm__ __volatile__("rd %%psr, %2\n\t"
109 "wr %2, 0x20, %%psr\n\t"
110 "ld %1,%0\n\t"
111 "sub %0,1,%0\n\t"
112 "st %0,%1\n\t"
113 "wr %2, 0x0, %2\n\t"
114 : "=r" (dummy), "=m" (intr_count)
115 : "0" (0), "r" (psr=0));
116 }
117
118 #endif
119