Skip to content

Commit 306b1c0

Browse files
mikeympe
authored andcommitted
powerpc/tm: Reformat comments
The comments in this file don't conform to the coding style so take them to "Comment Formatting Re-Education Camp". Suggested-by: Michael "Camp Drill Sergeant" Ellerman <[email protected]> Signed-off-by: Michael Neuling <[email protected]> [mpe: Reflow some comments and add full stops, fix spelling of Sergeant.] Signed-off-by: Michael Ellerman <[email protected]>
1 parent 5bd9b44 commit 306b1c0

File tree

1 file changed

+39
-28
lines changed
  • arch/powerpc/kernel

1 file changed

+39
-28
lines changed

arch/powerpc/kernel/tm.S

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ _GLOBAL(tm_abort)
9292
blr
9393
EXPORT_SYMBOL_GPL(tm_abort);
9494

95-
/* void tm_reclaim(struct thread_struct *thread,
95+
/*
96+
* void tm_reclaim(struct thread_struct *thread,
9697
* uint8_t cause)
9798
*
9899
* - Performs a full reclaim. This destroys outstanding
@@ -163,26 +164,27 @@ _GLOBAL(tm_reclaim)
163164
*/
164165
TRECLAIM(R4) /* Cause in r4 */
165166

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.
169170
*/
170171
SET_SCRATCH0(r13)
171172
GET_PACA(r13)
172173

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.
175177
*/
176178
std r1, PACATMSCRATCH(r13)
177179
ld r1, PACAR1(r13)
178180

179-
/* Store the PPR in r11 and reset to decent value */
180181
std r11, GPR11(r1) /* Temporary stash */
181182

182183
/* Reset MSR RI so we can take SLB faults again */
183184
li r11, MSR_RI
184185
mtmsrd r11, 1
185186

187+
/* Store the PPR in r11 and reset to decent value */
186188
mfspr r11, SPRN_PPR
187189
HMT_MEDIUM
188190

@@ -195,14 +197,15 @@ _GLOBAL(tm_reclaim)
195197

196198
addi r7, r12, PT_CKPT_REGS /* Thread's ckpt_regs */
197199

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!
200203
*/
201204
subi r7, r7, STACK_FRAME_OVERHEAD
202205

203206
/* Sync the userland GPRs 2-12, 14-31 to thread->regs: */
204207
SAVE_GPR(0, r7) /* user r0 */
205-
SAVE_GPR(2, r7) /* user r2 */
208+
SAVE_GPR(2, r7) /* user r2 */
206209
SAVE_4GPRS(3, r7) /* user r3-r6 */
207210
SAVE_GPR(8, r7) /* user r8 */
208211
SAVE_GPR(9, r7) /* user r9 */
@@ -223,7 +226,8 @@ _GLOBAL(tm_reclaim)
223226
/* ******************** NIP ******************** */
224227
mfspr r3, SPRN_TFHAR
225228
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,
227231
* but is used in signal return to 'wind back' to the abort handler.
228232
*/
229233

@@ -246,12 +250,13 @@ _GLOBAL(tm_reclaim)
246250
std r3, THREAD_TM_TAR(r12)
247251
std r4, THREAD_TM_DSCR(r12)
248252

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.
251255
*/
252256

253257

254-
/* ******************** FPR/VR/VSRs ************
258+
/*
259+
* ******************** FPR/VR/VSRs ************
255260
* After reclaiming, capture the checkpointed FPRs/VRs.
256261
*
257262
* We enabled VEC/FP/VSX in the msr above, so we can execute these
@@ -277,7 +282,8 @@ _GLOBAL(tm_reclaim)
277282
stfd fr0,FPSTATE_FPSCR(r7)
278283

279284

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
281287
* been updated by the treclaim, to explain to userland the failure
282288
* cause (aborted).
283289
*/
@@ -313,7 +319,7 @@ _GLOBAL(tm_reclaim)
313319
blr
314320

315321

316-
/*
322+
/*
317323
* void __tm_recheckpoint(struct thread_struct *thread)
318324
* - Restore the checkpointed register state saved by tm_reclaim
319325
* when we switch_to a process.
@@ -329,7 +335,8 @@ _GLOBAL(__tm_recheckpoint)
329335
std r2, STK_GOT(r1)
330336
stdu r1, -TM_FRAME_SIZE(r1)
331337

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].
333340
* This is used for backing up the NVGPRs:
334341
*/
335342
SAVE_NVGPRS(r1)
@@ -338,8 +345,9 @@ _GLOBAL(__tm_recheckpoint)
338345

339346
addi r7, r3, PT_CKPT_REGS /* Thread's ckpt_regs */
340347

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!
343351
*/
344352
subi r7, r7, STACK_FRAME_OVERHEAD
345353

@@ -407,23 +415,25 @@ restore_gprs:
407415

408416
REST_NVGPRS(r7) /* GPR14-31 */
409417

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 */
412419
mtspr SPRN_DSCR, r5
413420
mtspr SPRN_PPR, r6
414421

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
416424
* here before we load up the userspace r1 so any bugs we hit will get
417-
* a call chain */
425+
* a call chain.
426+
*/
418427
mfspr r5, SPRN_TEXASR
419428
srdi r5, r5, 16
420429
li r6, (TEXASR_FS)@h
421430
and r6, r6, r5
422431
1: tdeqi r6, 0
423432
EMIT_BUG_ENTRY 1b,__FILE__,__LINE__,0
424433

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.
427437
*/
428438
mfmsr r6
429439
li r5, (MSR_TS_MASK)@higher
@@ -439,8 +449,8 @@ restore_gprs:
439449
REST_GPR(6, r7)
440450

441451
/*
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.
444454
*/
445455

446456
REST_GPR(5, r7)
@@ -470,7 +480,8 @@ restore_gprs:
470480

471481
HMT_MEDIUM
472482

473-
/* Our transactional state has now changed.
483+
/*
484+
* Our transactional state has now changed.
474485
*
475486
* Now just get out of here. Transactional (current) state will be
476487
* updated once restore is called on the return path in the _switch-ed

0 commit comments

Comments
 (0)