Commit 8c3001b9 authored by Will Deacon's avatar Will Deacon

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: default avatarWill Deacon <will@kernel.org>
parent dc802f2b
...@@ -126,8 +126,10 @@ alternative_else_nop_endif ...@@ -126,8 +126,10 @@ alternative_else_nop_endif
add \dst, \dst, #(\sym - .entry.tramp.text) add \dst, \dst, #(\sym - .entry.tramp.text)
.endm .endm
// This macro corrupts x0-x3. It is the caller's duty /*
// to save/restore them if required. * This macro corrupts x0-x3. It is the caller's duty to save/restore
* them if required.
*/
.macro apply_ssbd, state, tmp1, tmp2 .macro apply_ssbd, state, tmp1, tmp2
#ifdef CONFIG_ARM64_SSBD #ifdef CONFIG_ARM64_SSBD
alternative_cb arm64_enable_wa2_handling alternative_cb arm64_enable_wa2_handling
...@@ -168,8 +170,10 @@ alternative_cb_end ...@@ -168,8 +170,10 @@ alternative_cb_end
.if \el == 0 .if \el == 0
.if \regsize == 32 .if \regsize == 32
// If we're returning from a 32-bit task on a system affected by /*
// 1418040 then re-enable userspace access to the virtual counter. * If we're returning from a 32-bit task on a system affected by
* 1418040 then re-enable userspace access to the virtual counter.
*/
#ifdef CONFIG_ARM64_ERRATUM_1418040 #ifdef CONFIG_ARM64_ERRATUM_1418040
alternative_if ARM64_WORKAROUND_1418040 alternative_if ARM64_WORKAROUND_1418040
mrs x0, cntkctl_el1 mrs x0, cntkctl_el1
...@@ -183,8 +187,10 @@ alternative_else_nop_endif ...@@ -183,8 +187,10 @@ alternative_else_nop_endif
ldr_this_cpu tsk, __entry_task, x20 ldr_this_cpu tsk, __entry_task, x20
msr sp_el0, tsk msr sp_el0, tsk
// Ensure MDSCR_EL1.SS is clear, since we can unmask debug exceptions /*
// when scheduling. * Ensure MDSCR_EL1.SS is clear, since we can unmask debug exceptions
* when scheduling.
*/
ldr x19, [tsk, #TSK_TI_FLAGS] ldr x19, [tsk, #TSK_TI_FLAGS]
disable_step_tsk x19, x20 disable_step_tsk x19, x20
...@@ -381,11 +387,11 @@ alternative_else_nop_endif ...@@ -381,11 +387,11 @@ alternative_else_nop_endif
.if \el == 0 .if \el == 0
alternative_insn eret, nop, ARM64_UNMAP_KERNEL_AT_EL0 alternative_insn eret, nop, ARM64_UNMAP_KERNEL_AT_EL0
#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 #ifdef CONFIG_UNMAP_KERNEL_AT_EL0
bne 5f bne 4f
msr far_el1, x30 msr far_el1, x30
tramp_alias x30, tramp_exit_native tramp_alias x30, tramp_exit_native
br x30 br x30
5: 4:
tramp_alias x30, tramp_exit_compat tramp_alias x30, tramp_exit_compat
br x30 br x30
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment