Commit 7b46a899 authored by Borislav Petkov's avatar Borislav Petkov Committed by Borislav Petkov (AMD)

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: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: https://lore.kernel.org/r/20240614095904.1345461-6-kirill.shutemov@linux.intel.com
parent 66e48e49
...@@ -148,9 +148,10 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped) ...@@ -148,9 +148,10 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
*/ */
movl $X86_CR4_PAE, %eax movl $X86_CR4_PAE, %eax
testq $X86_CR4_LA57, %r13 testq $X86_CR4_LA57, %r13
jz 1f jz .Lno_la57
orl $X86_CR4_LA57, %eax orl $X86_CR4_LA57, %eax
1: .Lno_la57:
movq %rax, %cr4 movq %rax, %cr4
/* Flush the TLB (needed?) */ /* Flush the TLB (needed?) */
...@@ -162,9 +163,9 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped) ...@@ -162,9 +163,9 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
* used by kexec. Flush the caches before copying the kernel. * used by kexec. Flush the caches before copying the kernel.
*/ */
testq %r12, %r12 testq %r12, %r12
jz 1f jz .Lsme_off
wbinvd wbinvd
1: .Lsme_off:
movq %rcx, %r11 movq %rcx, %r11
call swap_pages call swap_pages
...@@ -184,7 +185,7 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped) ...@@ -184,7 +185,7 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
*/ */
testq %r11, %r11 testq %r11, %r11
jnz 1f jnz .Lrelocate
xorl %eax, %eax xorl %eax, %eax
xorl %ebx, %ebx xorl %ebx, %ebx
xorl %ecx, %ecx xorl %ecx, %ecx
...@@ -205,7 +206,7 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped) ...@@ -205,7 +206,7 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
ret ret
int3 int3
1: .Lrelocate:
popq %rdx popq %rdx
leaq PAGE_SIZE(%r10), %rsp leaq PAGE_SIZE(%r10), %rsp
ANNOTATE_RETPOLINE_SAFE ANNOTATE_RETPOLINE_SAFE
......
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