@@ -92,7 +92,8 @@ _GLOBAL(tm_abort)
92
92
blr
93
93
EXPORT_SYMBOL_GPL(tm_abort);
94
94
95
- /* void tm_reclaim(struct thread_struct *thread,
95
+ /*
96
+ * void tm_reclaim(struct thread_struct *thread,
96
97
* uint8_t cause)
97
98
*
98
99
* - Performs a full reclaim. This destroys outstanding
@@ -163,26 +164,27 @@ _GLOBAL(tm_reclaim)
163
164
*/
164
165
TRECLAIM(R4) /* Cause in r4 */
165
166
166
- /* ******************** GPRs ******************** */
167
- /* Stash the checkpointed r13 away in the scratch SPR and get the real
168
- * paca
167
+ /*
168
+ * ******************** GPRs ********************
169
+ * Stash the checkpointed r13 in the scratch SPR and get the real paca.
169
170
*/
170
171
SET_SCRATCH0(r13)
171
172
GET_PACA(r13)
172
173
173
- /* Stash the checkpointed r1 away in paca tm_scratch and get the real
174
- * stack pointer back
174
+ /*
175
+ * Stash the checkpointed r1 away in paca->tm_scratch and get the real
176
+ * stack pointer back into r1.
175
177
*/
176
178
std r1, PACATMSCRATCH(r13)
177
179
ld r1, PACAR1(r13)
178
180
179
- /* Store the PPR in r11 and reset to decent value */
180
181
std r11, GPR11(r1) /* Temporary stash */
181
182
182
183
/* Reset MSR RI so we can take SLB faults again */
183
184
li r11, MSR_RI
184
185
mtmsrd r11, 1
185
186
187
+ /* Store the PPR in r11 and reset to decent value */
186
188
mfspr r11, SPRN_PPR
187
189
HMT_MEDIUM
188
190
@@ -195,14 +197,15 @@ _GLOBAL(tm_reclaim)
195
197
196
198
addi r7, r12, PT_CKPT_REGS /* Thread's ckpt_regs */
197
199
198
- /* Make r7 look like an exception frame so that we
199
- * can use the neat GPRx(n) macros. r7 is NOT a pt_regs ptr!
200
+ /*
201
+ * Make r7 look like an exception frame so that we can use the neat
202
+ * GPRx(n) macros. r7 is NOT a pt_regs ptr!
200
203
*/
201
204
subi r7, r7, STACK_FRAME_OVERHEAD
202
205
203
206
/* Sync the userland GPRs 2-12, 14-31 to thread->regs: */
204
207
SAVE_GPR(0 , r7) /* user r0 */
205
- SAVE_GPR(2 , r7) /* user r2 */
208
+ SAVE_GPR(2 , r7) /* user r2 */
206
209
SAVE_4GPRS(3 , r7) /* user r3-r6 */
207
210
SAVE_GPR(8 , r7) /* user r8 */
208
211
SAVE_GPR(9 , r7) /* user r9 */
@@ -223,7 +226,8 @@ _GLOBAL(tm_reclaim)
223
226
/* ******************** NIP ******************** */
224
227
mfspr r3, SPRN_TFHAR
225
228
std r3, _NIP(r7) /* Returns to failhandler */
226
- /* The checkpointed NIP is ignored when rescheduling/rechkpting,
229
+ /*
230
+ * The checkpointed NIP is ignored when rescheduling/rechkpting,
227
231
* but is used in signal return to 'wind back' to the abort handler.
228
232
*/
229
233
@@ -246,12 +250,13 @@ _GLOBAL(tm_reclaim)
246
250
std r3, THREAD_TM_TAR(r12)
247
251
std r4, THREAD_TM_DSCR(r12)
248
252
249
- /* MSR and flags: We don't change CRs, and we don't need to alter
250
- * MSR.
253
+ /*
254
+ * MSR and flags: We don't change CRs, and we don't need to alter MSR .
251
255
*/
252
256
253
257
254
- /* ******************** FPR/VR/VSRs ************
258
+ /*
259
+ * ******************** FPR/VR/VSRs ************
255
260
* After reclaiming, capture the checkpointed FPRs/VRs.
256
261
*
257
262
* We enabled VEC/FP/VSX in the msr above, so we can execute these
@@ -277,7 +282,8 @@ _GLOBAL(tm_reclaim)
277
282
stfd fr0,FPSTATE_FPSCR(r7)
278
283
279
284
280
- /* TM regs, incl TEXASR -- these live in thread_struct. Note they've
285
+ /*
286
+ * TM regs, incl TEXASR -- these live in thread_struct. Note they've
281
287
* been updated by the treclaim, to explain to userland the failure
282
288
* cause (aborted).
283
289
*/
@@ -313,7 +319,7 @@ _GLOBAL(tm_reclaim)
313
319
blr
314
320
315
321
316
- /*
322
+ /*
317
323
* void __tm_recheckpoint(struct thread_struct *thread)
318
324
* - Restore the checkpointed register state saved by tm_reclaim
319
325
* when we switch_to a process.
@@ -329,7 +335,8 @@ _GLOBAL(__tm_recheckpoint)
329
335
std r2, STK_GOT(r1)
330
336
stdu r1, -TM_FRAME_SIZE(r1)
331
337
332
- /* We've a struct pt_regs at [r1+STACK_FRAME_OVERHEAD].
338
+ /*
339
+ * We've a struct pt_regs at [r1+STACK_FRAME_OVERHEAD].
333
340
* This is used for backing up the NVGPRs:
334
341
*/
335
342
SAVE_NVGPRS(r1)
@@ -338,8 +345,9 @@ _GLOBAL(__tm_recheckpoint)
338
345
339
346
addi r7, r3, PT_CKPT_REGS /* Thread's ckpt_regs */
340
347
341
- /* Make r7 look like an exception frame so that we
342
- * can use the neat GPRx(n) macros. r7 is now NOT a pt_regs ptr!
348
+ /*
349
+ * Make r7 look like an exception frame so that we can use the neat
350
+ * GPRx(n) macros. r7 is now NOT a pt_regs ptr!
343
351
*/
344
352
subi r7, r7, STACK_FRAME_OVERHEAD
345
353
@@ -407,23 +415,25 @@ restore_gprs:
407
415
408
416
REST_NVGPRS(r7) /* GPR14-31 */
409
417
410
- /* Load up PPR and DSCR here so we don't run with user values for long
411
- */
418
+ /* Load up PPR and DSCR here so we don't run with user values for long */
412
419
mtspr SPRN_DSCR, r5
413
420
mtspr SPRN_PPR, r6
414
421
415
- /* Do final sanity check on TEXASR to make sure FS is set. Do this
422
+ /*
423
+ * Do final sanity check on TEXASR to make sure FS is set. Do this
416
424
* here before we load up the userspace r1 so any bugs we hit will get
417
- * a call chain */
425
+ * a call chain.
426
+ */
418
427
mfspr r5, SPRN_TEXASR
419
428
srdi r5, r5, 16
420
429
li r6, (TEXASR_FS)@h
421
430
and r6, r6, r5
422
431
1: tdeqi r6, 0
423
432
EMIT_BUG_ENTRY 1b,__FILE__ ,__LINE__ ,0
424
433
425
- /* Do final sanity check on MSR to make sure we are not transactional
426
- * or suspended
434
+ /*
435
+ * Do final sanity check on MSR to make sure we are not transactional
436
+ * or suspended.
427
437
*/
428
438
mfmsr r6
429
439
li r5, (MSR_TS_MASK)@higher
@@ -439,8 +449,8 @@ restore_gprs:
439
449
REST_GPR(6 , r7)
440
450
441
451
/*
442
- * Store r1 and r5 on the stack so that we can access them
443
- * after we clear MSR RI.
452
+ * Store r1 and r5 on the stack so that we can access them after we
453
+ * clear MSR RI.
444
454
*/
445
455
446
456
REST_GPR(5 , r7)
@@ -470,7 +480,8 @@ restore_gprs:
470
480
471
481
HMT_MEDIUM
472
482
473
- /* Our transactional state has now changed.
483
+ /*
484
+ * Our transactional state has now changed.
474
485
*
475
486
* Now just get out of here. Transactional (current) state will be
476
487
* updated once restore is called on the return path in the _switch-ed
0 commit comments