Skip to content

Commit 8c3001b

Browse files
committed
arm64: entry: Tidy up block comments and label numbers
Continually butchering our entry code with CPU errata workarounds has led to it looking a little scruffy. Consistently used /* */ comment style for multi-line block comments and ensure that small numeric labels use consecutive integers. No functional change, but the state of things was irritating. Signed-off-by: Will Deacon <[email protected]>
1 parent dc802f2 commit 8c3001b

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

arch/arm64/kernel/entry.S

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,10 @@ alternative_else_nop_endif
126126
add \dst, \dst, #(\sym - .entry.tramp.text)
127127
.endm
128128

129-
// This macro corrupts x0-x3. It is the caller's duty
130-
// to save/restore them if required.
129+
/*
130+
* This macro corrupts x0-x3. It is the caller's duty to save/restore
131+
* them if required.
132+
*/
131133
.macro apply_ssbd, state, tmp1, tmp2
132134
#ifdef CONFIG_ARM64_SSBD
133135
alternative_cb arm64_enable_wa2_handling
@@ -168,8 +170,10 @@ alternative_cb_end
168170

169171
.if \el == 0
170172
.if \regsize == 32
171-
// If we're returning from a 32-bit task on a system affected by
172-
// 1418040 then re-enable userspace access to the virtual counter.
173+
/*
174+
* If we're returning from a 32-bit task on a system affected by
175+
* 1418040 then re-enable userspace access to the virtual counter.
176+
*/
173177
#ifdef CONFIG_ARM64_ERRATUM_1418040
174178
alternative_if ARM64_WORKAROUND_1418040
175179
mrs x0, cntkctl_el1
@@ -183,8 +187,10 @@ alternative_else_nop_endif
183187
ldr_this_cpu tsk, __entry_task, x20
184188
msr sp_el0, tsk
185189

186-
// Ensure MDSCR_EL1.SS is clear, since we can unmask debug exceptions
187-
// when scheduling.
190+
/*
191+
* Ensure MDSCR_EL1.SS is clear, since we can unmask debug exceptions
192+
* when scheduling.
193+
*/
188194
ldr x19, [tsk, #TSK_TI_FLAGS]
189195
disable_step_tsk x19, x20
190196

@@ -381,11 +387,11 @@ alternative_else_nop_endif
381387
.if \el == 0
382388
alternative_insn eret, nop, ARM64_UNMAP_KERNEL_AT_EL0
383389
#ifdef CONFIG_UNMAP_KERNEL_AT_EL0
384-
bne 5f
390+
bne 4f
385391
msr far_el1, x30
386392
tramp_alias x30, tramp_exit_native
387393
br x30
388-
5:
394+
4:
389395
tramp_alias x30, tramp_exit_compat
390396
br x30
391397
#endif

0 commit comments

Comments
 (0)