arm64: entry: Tidy up block comments and label numbers
authorWill Deacon <will@kernel.org>
Wed, 8 Jul 2020 21:10:01 +0000 (22:10 +0100)
committerWill Deacon <will@kernel.org>
Wed, 8 Jul 2020 21:13:33 +0000 (22:13 +0100)
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 <will@kernel.org>
arch/arm64/kernel/entry.S

index 9757a8d5fd94ed082ed18ebd4d574d83a261681d..35de8ba60e3d5801b2539ac4354834cd7538b835 100644 (file)
@@ -126,8 +126,10 @@ alternative_else_nop_endif
        add     \dst, \dst, #(\sym - .entry.tramp.text)
        .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
 #ifdef CONFIG_ARM64_SSBD
 alternative_cb arm64_enable_wa2_handling
@@ -168,8 +170,10 @@ alternative_cb_end
 
        .if     \el == 0
        .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
 alternative_if ARM64_WORKAROUND_1418040
        mrs     x0, cntkctl_el1
@@ -183,8 +187,10 @@ alternative_else_nop_endif
        ldr_this_cpu    tsk, __entry_task, x20
        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]
        disable_step_tsk x19, x20
 
@@ -381,11 +387,11 @@ alternative_else_nop_endif
        .if     \el == 0
 alternative_insn eret, nop, ARM64_UNMAP_KERNEL_AT_EL0
 #ifdef CONFIG_UNMAP_KERNEL_AT_EL0
-       bne     5f
+       bne     4f
        msr     far_el1, x30
        tramp_alias     x30, tramp_exit_native
        br      x30
-5:
+4:
        tramp_alias     x30, tramp_exit_compat
        br      x30
 #endif