diff options
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/spu_restore.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped | 470 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/switch.c | 12 | ||||
-rw-r--r-- | include/asm-powerpc/spu_csa.h | 8 |
4 files changed, 269 insertions, 223 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/spu_restore.c b/arch/powerpc/platforms/cell/spufs/spu_restore.c index 4e19ed7a0756..7114e033460e 100644 --- a/arch/powerpc/platforms/cell/spufs/spu_restore.c +++ b/arch/powerpc/platforms/cell/spufs/spu_restore.c | |||
@@ -90,7 +90,7 @@ static inline void restore_decr(void) | |||
90 | * decrementer value from LSCSA. | 90 | * decrementer value from LSCSA. |
91 | */ | 91 | */ |
92 | offset = LSCSA_QW_OFFSET(decr_status); | 92 | offset = LSCSA_QW_OFFSET(decr_status); |
93 | decr_running = regs_spill[offset].slot[0]; | 93 | decr_running = regs_spill[offset].slot[0] & SPU_DECR_STATUS_RUNNING; |
94 | if (decr_running) { | 94 | if (decr_running) { |
95 | offset = LSCSA_QW_OFFSET(decr); | 95 | offset = LSCSA_QW_OFFSET(decr); |
96 | decr = regs_spill[offset].slot[0]; | 96 | decr = regs_spill[offset].slot[0]; |
diff --git a/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped b/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped index 15183d209b58..799815e22377 100644 --- a/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped +++ b/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped | |||
@@ -10,7 +10,7 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = { | |||
10 | 0x24fd8081, | 10 | 0x24fd8081, |
11 | 0x1cd80081, | 11 | 0x1cd80081, |
12 | 0x33001180, | 12 | 0x33001180, |
13 | 0x42030003, | 13 | 0x42034003, |
14 | 0x33800284, | 14 | 0x33800284, |
15 | 0x1c010204, | 15 | 0x1c010204, |
16 | 0x40200000, | 16 | 0x40200000, |
@@ -24,22 +24,22 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = { | |||
24 | 0x23fffd84, | 24 | 0x23fffd84, |
25 | 0x1c100183, | 25 | 0x1c100183, |
26 | 0x217ffa85, | 26 | 0x217ffa85, |
27 | 0x3080a000, | 27 | 0x3080b000, |
28 | 0x3080a201, | 28 | 0x3080b201, |
29 | 0x3080a402, | 29 | 0x3080b402, |
30 | 0x3080a603, | 30 | 0x3080b603, |
31 | 0x3080a804, | 31 | 0x3080b804, |
32 | 0x3080aa05, | 32 | 0x3080ba05, |
33 | 0x3080ac06, | 33 | 0x3080bc06, |
34 | 0x3080ae07, | 34 | 0x3080be07, |
35 | 0x3080b008, | 35 | 0x3080c008, |
36 | 0x3080b209, | 36 | 0x3080c209, |
37 | 0x3080b40a, | 37 | 0x3080c40a, |
38 | 0x3080b60b, | 38 | 0x3080c60b, |
39 | 0x3080b80c, | 39 | 0x3080c80c, |
40 | 0x3080ba0d, | 40 | 0x3080ca0d, |
41 | 0x3080bc0e, | 41 | 0x3080cc0e, |
42 | 0x3080be0f, | 42 | 0x3080ce0f, |
43 | 0x00003ffc, | 43 | 0x00003ffc, |
44 | 0x00000000, | 44 | 0x00000000, |
45 | 0x00000000, | 45 | 0x00000000, |
@@ -48,19 +48,18 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = { | |||
48 | 0x3ec00083, | 48 | 0x3ec00083, |
49 | 0xb0a14103, | 49 | 0xb0a14103, |
50 | 0x01a00204, | 50 | 0x01a00204, |
51 | 0x3ec10082, | 51 | 0x3ec10083, |
52 | 0x4202800e, | 52 | 0x4202c002, |
53 | 0x04000703, | 53 | 0xb0a14203, |
54 | 0xb0a14202, | 54 | 0x21a00802, |
55 | 0x21a00803, | 55 | 0x3fbf028a, |
56 | 0x3fbf028d, | 56 | 0x3f20050a, |
57 | 0x3f20068d, | 57 | 0x3fbe0502, |
58 | 0x3fbe0682, | ||
59 | 0x3fe30102, | 58 | 0x3fe30102, |
60 | 0x21a00882, | 59 | 0x21a00882, |
61 | 0x3f82028f, | 60 | 0x3f82028b, |
62 | 0x3fe3078f, | 61 | 0x3fe3058b, |
63 | 0x3fbf0784, | 62 | 0x3fbf0584, |
64 | 0x3f200204, | 63 | 0x3f200204, |
65 | 0x3fbe0204, | 64 | 0x3fbe0204, |
66 | 0x3fe30204, | 65 | 0x3fe30204, |
@@ -75,52 +74,46 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = { | |||
75 | 0x21a00083, | 74 | 0x21a00083, |
76 | 0x40800082, | 75 | 0x40800082, |
77 | 0x21a00b02, | 76 | 0x21a00b02, |
78 | 0x10002818, | 77 | 0x10002612, |
79 | 0x42a00002, | 78 | 0x42a00003, |
80 | 0x32800007, | 79 | 0x42074006, |
81 | 0x4207000c, | 80 | 0x1800c204, |
82 | 0x18008208, | 81 | 0x40a00008, |
83 | 0x40a0000b, | 82 | 0x40800789, |
84 | 0x4080020a, | 83 | 0x1c010305, |
85 | 0x40800709, | 84 | 0x34000302, |
86 | 0x00200000, | ||
87 | 0x42070002, | ||
88 | 0x3ac30384, | ||
89 | 0x1cffc489, | 85 | 0x1cffc489, |
90 | 0x00200000, | 86 | 0x3ec00303, |
91 | 0x18008383, | 87 | 0x3ec00287, |
92 | 0x38830382, | 88 | 0xb0408403, |
93 | 0x4cffc486, | 89 | 0x24000302, |
94 | 0x3ac28185, | 90 | 0x34000282, |
95 | 0xb0408584, | 91 | 0x1c020306, |
96 | 0x28830382, | 92 | 0xb0408207, |
97 | 0x1c020387, | 93 | 0x18020204, |
98 | 0x38828182, | 94 | 0x24000282, |
99 | 0xb0408405, | 95 | 0x217ffa09, |
100 | 0x1802c408, | 96 | 0x04000403, |
101 | 0x28828182, | ||
102 | 0x217ff886, | ||
103 | 0x04000583, | ||
104 | 0x21a00803, | 97 | 0x21a00803, |
105 | 0x3fbe0682, | 98 | 0x3fbe0502, |
106 | 0x3fe30102, | 99 | 0x3fe30102, |
107 | 0x04000106, | 100 | 0x04000105, |
108 | 0x21a00886, | 101 | 0x21a00885, |
109 | 0x04000603, | 102 | 0x42074002, |
110 | 0x21a00903, | 103 | 0x21a00902, |
111 | 0x40803c02, | 104 | 0x40803c03, |
112 | 0x21a00982, | 105 | 0x21a00983, |
113 | 0x40800003, | 106 | 0x04000484, |
114 | 0x04000184, | ||
115 | 0x21a00a04, | 107 | 0x21a00a04, |
116 | 0x40802202, | 108 | 0x40802202, |
117 | 0x21a00a82, | 109 | 0x21a00a82, |
118 | 0x42028005, | 110 | 0x30809c03, |
119 | 0x34208702, | 111 | 0x34000182, |
120 | 0x21002282, | 112 | 0x14004102, |
113 | 0x21002782, | ||
121 | 0x21a00804, | 114 | 0x21a00804, |
122 | 0x21a00886, | 115 | 0x21a00885, |
123 | 0x3fbf0782, | 116 | 0x3fbf0582, |
124 | 0x3f200102, | 117 | 0x3f200102, |
125 | 0x3fbe0102, | 118 | 0x3fbe0102, |
126 | 0x3fe30102, | 119 | 0x3fe30102, |
@@ -133,194 +126,233 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = { | |||
133 | 0x40800083, | 126 | 0x40800083, |
134 | 0x21a00b83, | 127 | 0x21a00b83, |
135 | 0x01a00c02, | 128 | 0x01a00c02, |
136 | 0x01a00d83, | 129 | 0x01a00d84, |
137 | 0x3420c282, | 130 | 0x3080a003, |
131 | 0x34000182, | ||
138 | 0x21a00e02, | 132 | 0x21a00e02, |
139 | 0x34210283, | 133 | 0x3080a203, |
140 | 0x21a00f03, | 134 | 0x34000182, |
141 | 0x34200284, | 135 | 0x21a00f02, |
142 | 0x77400200, | 136 | 0x3080a403, |
143 | 0x3421c282, | 137 | 0x34000182, |
138 | 0x77400100, | ||
139 | 0x3080a603, | ||
140 | 0x34000182, | ||
144 | 0x21a00702, | 141 | 0x21a00702, |
145 | 0x34218283, | 142 | 0x3080a803, |
146 | 0x21a00083, | 143 | 0x34000182, |
147 | 0x34214282, | 144 | 0x21a00082, |
145 | 0x3080aa03, | ||
146 | 0x34000182, | ||
148 | 0x21a00b02, | 147 | 0x21a00b02, |
149 | 0x4200480c, | 148 | 0x3080ae02, |
150 | 0x00200000, | 149 | 0x3080ac04, |
151 | 0x1c010286, | 150 | 0x42004805, |
152 | 0x34220284, | 151 | 0x34000103, |
153 | 0x34220302, | 152 | 0x34000202, |
154 | 0x0f608203, | 153 | 0x1cffc183, |
155 | 0x5c024204, | 154 | 0x3b810106, |
156 | 0x3b81810b, | 155 | 0x0f608184, |
157 | 0x42013c02, | 156 | 0x42013802, |
158 | 0x00200000, | 157 | 0x5c020183, |
159 | 0x18008185, | 158 | 0x38810102, |
160 | 0x38808183, | 159 | 0x3b810102, |
161 | 0x3b814182, | 160 | 0x21000e83, |
162 | 0x21004e84, | ||
163 | 0x4020007f, | 161 | 0x4020007f, |
164 | 0x35000100, | 162 | 0x35000100, |
165 | 0x000004e0, | 163 | 0x00000470, |
166 | 0x000002a0, | 164 | 0x000002f8, |
167 | 0x000002e8, | 165 | 0x00000430, |
168 | 0x00000428, | ||
169 | 0x00000360, | 166 | 0x00000360, |
170 | 0x000002e8, | 167 | 0x000002f8, |
171 | 0x000004a0, | ||
172 | 0x00000468, | ||
173 | 0x000003c8, | 168 | 0x000003c8, |
169 | 0x000004a8, | ||
170 | 0x00000298, | ||
174 | 0x00000360, | 171 | 0x00000360, |
172 | 0x00200000, | ||
175 | 0x409ffe02, | 173 | 0x409ffe02, |
176 | 0x30801203, | 174 | 0x30801203, |
177 | 0x40800204, | 175 | 0x40800208, |
178 | 0x3ec40085, | 176 | 0x3ec40084, |
179 | 0x10009c09, | 177 | 0x40800407, |
180 | 0x3ac10606, | 178 | 0x3ac20289, |
181 | 0xb060c105, | 179 | 0xb060c104, |
182 | 0x4020007f, | 180 | 0x3ac1c284, |
183 | 0x4020007f, | ||
184 | 0x20801203, | 181 | 0x20801203, |
185 | 0x38810602, | 182 | 0x38820282, |
186 | 0xb0408586, | 183 | 0x41004003, |
187 | 0x28810602, | 184 | 0xb0408189, |
188 | 0x32004180, | 185 | 0x28820282, |
189 | 0x34204702, | 186 | 0x3881c282, |
187 | 0xb0408304, | ||
188 | 0x2881c282, | ||
189 | 0x00400000, | ||
190 | 0x40800003, | ||
191 | 0x35000000, | ||
192 | 0x30809e03, | ||
193 | 0x34000182, | ||
190 | 0x21a00382, | 194 | 0x21a00382, |
191 | 0x4020007f, | 195 | 0x4020007f, |
192 | 0x327fdc80, | 196 | 0x327fd700, |
193 | 0x409ffe02, | 197 | 0x409ffe02, |
194 | 0x30801203, | 198 | 0x30801203, |
195 | 0x40800204, | 199 | 0x40800206, |
196 | 0x3ec40087, | 200 | 0x3ec40084, |
197 | 0x40800405, | 201 | 0x40800407, |
198 | 0x00200000, | 202 | 0x40800608, |
199 | 0x40800606, | 203 | 0x3ac1828a, |
200 | 0x3ac10608, | 204 | 0x3ac20289, |
201 | 0x3ac14609, | 205 | 0xb060c104, |
202 | 0x3ac1860a, | 206 | 0x3ac1c284, |
203 | 0xb060c107, | ||
204 | 0x20801203, | 207 | 0x20801203, |
208 | 0x38818282, | ||
205 | 0x41004003, | 209 | 0x41004003, |
206 | 0x38810602, | 210 | 0xb040818a, |
207 | 0x4020007f, | 211 | 0x10005b0b, |
208 | 0xb0408188, | 212 | 0x41201003, |
209 | 0x4020007f, | 213 | 0x28818282, |
210 | 0x28810602, | 214 | 0x3881c282, |
211 | 0x41201002, | 215 | 0xb0408184, |
212 | 0x38814603, | ||
213 | 0x10009c09, | ||
214 | 0xb060c109, | ||
215 | 0x4020007f, | ||
216 | 0x28814603, | ||
217 | 0x41193f83, | 216 | 0x41193f83, |
218 | 0x38818602, | ||
219 | 0x60ffc003, | 217 | 0x60ffc003, |
220 | 0xb040818a, | 218 | 0x2881c282, |
221 | 0x28818602, | 219 | 0x38820282, |
222 | 0x32003080, | 220 | 0xb0408189, |
221 | 0x28820282, | ||
222 | 0x327fef80, | ||
223 | 0x409ffe02, | 223 | 0x409ffe02, |
224 | 0x30801203, | 224 | 0x30801203, |
225 | 0x40800204, | 225 | 0x40800207, |
226 | 0x3ec40087, | 226 | 0x3ec40086, |
227 | 0x41201008, | 227 | 0x4120100b, |
228 | 0x10009c14, | 228 | 0x10005b14, |
229 | 0x40800405, | 229 | 0x40800404, |
230 | 0x3ac10609, | 230 | 0x3ac1c289, |
231 | 0x40800606, | 231 | 0x40800608, |
232 | 0x3ac1460a, | 232 | 0xb060c106, |
233 | 0xb060c107, | 233 | 0x3ac10286, |
234 | 0x3ac1860b, | 234 | 0x3ac2028a, |
235 | 0x20801203, | 235 | 0x20801203, |
236 | 0x38810602, | 236 | 0x3881c282, |
237 | 0xb0408409, | ||
238 | 0x28810602, | ||
239 | 0x38814603, | ||
240 | 0xb060c40a, | ||
241 | 0x4020007f, | ||
242 | 0x28814603, | ||
243 | 0x41193f83, | 237 | 0x41193f83, |
244 | 0x38818602, | ||
245 | 0x60ffc003, | 238 | 0x60ffc003, |
246 | 0xb040818b, | 239 | 0xb0408589, |
247 | 0x28818602, | 240 | 0x2881c282, |
248 | 0x32002380, | 241 | 0x38810282, |
249 | 0x409ffe02, | 242 | 0xb0408586, |
250 | 0x30801204, | 243 | 0x28810282, |
251 | 0x40800205, | 244 | 0x38820282, |
252 | 0x3ec40083, | 245 | 0xb040818a, |
253 | 0x40800406, | 246 | 0x28820282, |
254 | 0x3ac14607, | ||
255 | 0x3ac18608, | ||
256 | 0xb0810103, | ||
257 | 0x41004002, | ||
258 | 0x20801204, | ||
259 | 0x4020007f, | ||
260 | 0x38814603, | ||
261 | 0x10009c0b, | ||
262 | 0xb060c107, | ||
263 | 0x4020007f, | ||
264 | 0x4020007f, | ||
265 | 0x28814603, | ||
266 | 0x38818602, | ||
267 | 0x4020007f, | ||
268 | 0x4020007f, | 247 | 0x4020007f, |
269 | 0xb0408588, | 248 | 0x327fe280, |
270 | 0x28818602, | 249 | 0x409ffe02, |
250 | 0x30801203, | ||
251 | 0x40800207, | ||
252 | 0x3ec40084, | ||
253 | 0x40800408, | ||
254 | 0x10005b14, | ||
255 | 0x40800609, | ||
256 | 0x3ac1c28a, | ||
257 | 0x3ac2028b, | ||
258 | 0xb060c104, | ||
259 | 0x3ac24284, | ||
260 | 0x20801203, | ||
261 | 0x41201003, | ||
262 | 0x3881c282, | ||
263 | 0xb040830a, | ||
264 | 0x2881c282, | ||
265 | 0x38820282, | ||
266 | 0xb040818b, | ||
267 | 0x41193f83, | ||
268 | 0x60ffc003, | ||
269 | 0x28820282, | ||
270 | 0x38824282, | ||
271 | 0xb0408184, | ||
272 | 0x28824282, | ||
271 | 0x4020007f, | 273 | 0x4020007f, |
272 | 0x32001780, | 274 | 0x327fd580, |
273 | 0x409ffe02, | 275 | 0x409ffe02, |
274 | 0x1000640e, | 276 | 0x1000658e, |
275 | 0x40800204, | 277 | 0x40800206, |
276 | 0x30801203, | 278 | 0x30801203, |
277 | 0x40800405, | 279 | 0x40800407, |
278 | 0x3ec40087, | 280 | 0x3ec40084, |
279 | 0x40800606, | 281 | 0x40800608, |
280 | 0x3ac10608, | 282 | 0x3ac1828a, |
281 | 0x3ac14609, | 283 | 0x3ac20289, |
282 | 0x3ac1860a, | 284 | 0xb060c104, |
283 | 0xb060c107, | 285 | 0x3ac1c284, |
284 | 0x20801203, | 286 | 0x20801203, |
285 | 0x413d8003, | 287 | 0x413d8003, |
286 | 0x38810602, | 288 | 0x38818282, |
289 | 0x4020007f, | ||
290 | 0x327fd800, | ||
291 | 0x409ffe03, | ||
292 | 0x30801202, | ||
293 | 0x40800207, | ||
294 | 0x3ec40084, | ||
295 | 0x10005b09, | ||
296 | 0x3ac1c288, | ||
297 | 0xb0408184, | ||
287 | 0x4020007f, | 298 | 0x4020007f, |
288 | 0x327fd780, | ||
289 | 0x409ffe02, | ||
290 | 0x10007f0c, | ||
291 | 0x40800205, | ||
292 | 0x30801204, | ||
293 | 0x40800406, | ||
294 | 0x3ec40083, | ||
295 | 0x3ac14607, | ||
296 | 0x3ac18608, | ||
297 | 0xb0810103, | ||
298 | 0x413d8002, | ||
299 | 0x20801204, | ||
300 | 0x38814603, | ||
301 | 0x4020007f, | 299 | 0x4020007f, |
302 | 0x327feb80, | 300 | 0x20801202, |
301 | 0x3881c282, | ||
302 | 0xb0408308, | ||
303 | 0x2881c282, | ||
304 | 0x327fc680, | ||
303 | 0x409ffe02, | 305 | 0x409ffe02, |
306 | 0x1000588b, | ||
307 | 0x40800208, | ||
304 | 0x30801203, | 308 | 0x30801203, |
305 | 0x40800204, | 309 | 0x40800407, |
306 | 0x3ec40087, | 310 | 0x3ec40084, |
307 | 0x40800405, | 311 | 0x3ac20289, |
308 | 0x1000650a, | 312 | 0xb060c104, |
309 | 0x40800606, | 313 | 0x3ac1c284, |
310 | 0x3ac10608, | ||
311 | 0x3ac14609, | ||
312 | 0x3ac1860a, | ||
313 | 0xb060c107, | ||
314 | 0x20801203, | 314 | 0x20801203, |
315 | 0x38810602, | 315 | 0x413d8003, |
316 | 0xb0408588, | 316 | 0x38820282, |
317 | 0x4020007f, | 317 | 0x327fbd80, |
318 | 0x327fc980, | 318 | 0x00200000, |
319 | 0x00400000, | 319 | 0x00000da0, |
320 | 0x40800003, | 320 | 0x00000000, |
321 | 0x4020007f, | 321 | 0x00000000, |
322 | 0x35000000, | 322 | 0x00000000, |
323 | 0x00000d90, | ||
324 | 0x00000000, | ||
325 | 0x00000000, | ||
326 | 0x00000000, | ||
327 | 0x00000db0, | ||
328 | 0x00000000, | ||
329 | 0x00000000, | ||
330 | 0x00000000, | ||
331 | 0x00000dc0, | ||
332 | 0x00000000, | ||
333 | 0x00000000, | ||
334 | 0x00000000, | ||
335 | 0x00000d80, | ||
336 | 0x00000000, | ||
337 | 0x00000000, | ||
338 | 0x00000000, | ||
339 | 0x00000df0, | ||
340 | 0x00000000, | ||
341 | 0x00000000, | ||
342 | 0x00000000, | ||
343 | 0x00000de0, | ||
344 | 0x00000000, | ||
345 | 0x00000000, | ||
346 | 0x00000000, | ||
347 | 0x00000dd0, | ||
348 | 0x00000000, | ||
349 | 0x00000000, | ||
350 | 0x00000000, | ||
351 | 0x00000e04, | ||
352 | 0x00000000, | ||
353 | 0x00000000, | ||
323 | 0x00000000, | 354 | 0x00000000, |
355 | 0x00000e00, | ||
324 | 0x00000000, | 356 | 0x00000000, |
325 | 0x00000000, | 357 | 0x00000000, |
326 | 0x00000000, | 358 | 0x00000000, |
diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c index a08fe93817f6..d4dea1874847 100644 --- a/arch/powerpc/platforms/cell/spufs/switch.c +++ b/arch/powerpc/platforms/cell/spufs/switch.c | |||
@@ -1285,7 +1285,15 @@ static inline void setup_decr(struct spu_state *csa, struct spu *spu) | |||
1285 | cycles_t resume_time = get_cycles(); | 1285 | cycles_t resume_time = get_cycles(); |
1286 | cycles_t delta_time = resume_time - csa->suspend_time; | 1286 | cycles_t delta_time = resume_time - csa->suspend_time; |
1287 | 1287 | ||
1288 | csa->lscsa->decr_status.slot[0] = SPU_DECR_STATUS_RUNNING; | ||
1289 | if (csa->lscsa->decr.slot[0] < delta_time) { | ||
1290 | csa->lscsa->decr_status.slot[0] |= | ||
1291 | SPU_DECR_STATUS_WRAPPED; | ||
1292 | } | ||
1293 | |||
1288 | csa->lscsa->decr.slot[0] -= delta_time; | 1294 | csa->lscsa->decr.slot[0] -= delta_time; |
1295 | } else { | ||
1296 | csa->lscsa->decr_status.slot[0] = 0; | ||
1289 | } | 1297 | } |
1290 | } | 1298 | } |
1291 | 1299 | ||
@@ -1544,10 +1552,10 @@ static inline void restore_decr_wrapped(struct spu_state *csa, struct spu *spu) | |||
1544 | * "wrapped" flag is set, OR in a '1' to | 1552 | * "wrapped" flag is set, OR in a '1' to |
1545 | * CSA.SPU_Event_Status[Tm]. | 1553 | * CSA.SPU_Event_Status[Tm]. |
1546 | */ | 1554 | */ |
1547 | if (csa->lscsa->decr_status.slot[0] == 1) { | 1555 | if (csa->lscsa->decr_status.slot[0] & SPU_DECR_STATUS_WRAPPED) { |
1548 | csa->spu_chnldata_RW[0] |= 0x20; | 1556 | csa->spu_chnldata_RW[0] |= 0x20; |
1549 | } | 1557 | } |
1550 | if ((csa->lscsa->decr_status.slot[0] == 1) && | 1558 | if ((csa->lscsa->decr_status.slot[0] & SPU_DECR_STATUS_WRAPPED) && |
1551 | (csa->spu_chnlcnt_RW[0] == 0 && | 1559 | (csa->spu_chnlcnt_RW[0] == 0 && |
1552 | ((csa->spu_chnldata_RW[2] & 0x20) == 0x0) && | 1560 | ((csa->spu_chnldata_RW[2] & 0x20) == 0x0) && |
1553 | ((csa->spu_chnldata_RW[0] & 0x20) != 0x1))) { | 1561 | ((csa->spu_chnldata_RW[0] & 0x20) != 0x1))) { |
diff --git a/include/asm-powerpc/spu_csa.h b/include/asm-powerpc/spu_csa.h index c48ae185c874..e87794d5d4ea 100644 --- a/include/asm-powerpc/spu_csa.h +++ b/include/asm-powerpc/spu_csa.h | |||
@@ -50,6 +50,12 @@ | |||
50 | #define SPU_STOPPED_STATUS_P_I 8 | 50 | #define SPU_STOPPED_STATUS_P_I 8 |
51 | #define SPU_STOPPED_STATUS_R 9 | 51 | #define SPU_STOPPED_STATUS_R 9 |
52 | 52 | ||
53 | /* | ||
54 | * Definitions for software decrementer status flag. | ||
55 | */ | ||
56 | #define SPU_DECR_STATUS_RUNNING 0x1 | ||
57 | #define SPU_DECR_STATUS_WRAPPED 0x2 | ||
58 | |||
53 | #ifndef __ASSEMBLY__ | 59 | #ifndef __ASSEMBLY__ |
54 | /** | 60 | /** |
55 | * spu_reg128 - generic 128-bit register definition. | 61 | * spu_reg128 - generic 128-bit register definition. |
@@ -63,7 +69,7 @@ struct spu_reg128 { | |||
63 | * @gprs: Array of saved registers. | 69 | * @gprs: Array of saved registers. |
64 | * @fpcr: Saved floating point status control register. | 70 | * @fpcr: Saved floating point status control register. |
65 | * @decr: Saved decrementer value. | 71 | * @decr: Saved decrementer value. |
66 | * @decr_status: Indicates decrementer run status. | 72 | * @decr_status: Indicates software decrementer status flags. |
67 | * @ppu_mb: Saved PPU mailbox data. | 73 | * @ppu_mb: Saved PPU mailbox data. |
68 | * @ppuint_mb: Saved PPU interrupting mailbox data. | 74 | * @ppuint_mb: Saved PPU interrupting mailbox data. |
69 | * @tag_mask: Saved tag group mask. | 75 | * @tag_mask: Saved tag group mask. |