Skip to content

Commit 7b46a89

Browse files
committed
x86/relocate_kernel: Use named labels for less confusion
That identity_mapped() function was loving that "1" label to the point of completely confusing its readers. Use named labels in each place for clarity. No functional changes. Signed-off-by: Borislav Petkov (AMD) <[email protected]> Signed-off-by: Kirill A. Shutemov <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 66e48e4 commit 7b46a89

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

arch/x86/kernel/relocate_kernel_64.S

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,10 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
148148
*/
149149
movl $X86_CR4_PAE, %eax
150150
testq $X86_CR4_LA57, %r13
151-
jz 1f
151+
jz .Lno_la57
152152
orl $X86_CR4_LA57, %eax
153-
1:
153+
.Lno_la57:
154+
154155
movq %rax, %cr4
155156

156157
/* Flush the TLB (needed?) */
@@ -162,9 +163,9 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
162163
* used by kexec. Flush the caches before copying the kernel.
163164
*/
164165
testq %r12, %r12
165-
jz 1f
166+
jz .Lsme_off
166167
wbinvd
167-
1:
168+
.Lsme_off:
168169

169170
movq %rcx, %r11
170171
call swap_pages
@@ -184,7 +185,7 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
184185
*/
185186

186187
testq %r11, %r11
187-
jnz 1f
188+
jnz .Lrelocate
188189
xorl %eax, %eax
189190
xorl %ebx, %ebx
190191
xorl %ecx, %ecx
@@ -205,7 +206,7 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
205206
ret
206207
int3
207208

208-
1:
209+
.Lrelocate:
209210
popq %rdx
210211
leaq PAGE_SIZE(%r10), %rsp
211212
ANNOTATE_RETPOLINE_SAFE

0 commit comments

Comments
 (0)