summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed/mem_encrypt.S
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-11-22 17:10:15 +0100
committerBorislav Petkov <bp@suse.de>2022-11-24 08:57:41 +0100
commit30c9ca16a5271ba6f8ad9c86507ff1c789c94677 (patch)
treecc46ade3571175118d37271e258a6e9a789f9868 /arch/x86/boot/compressed/mem_encrypt.S
parent9d7eaae6a071ff1f718e0aa5e610bb712f8cc632 (diff)
downloadlinux-30c9ca16a5271ba6f8ad9c86507ff1c789c94677.tar.bz2
x86/boot/compressed: Adhere to calling convention in get_sev_encryption_bit()
Make get_sev_encryption_bit() follow the ordinary i386 calling convention, and only call it if CONFIG_AMD_MEM_ENCRYPT is actually enabled. This clarifies the calling code, and makes it more maintainable. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20221122161017.2426828-16-ardb@kernel.org
Diffstat (limited to 'arch/x86/boot/compressed/mem_encrypt.S')
-rw-r--r--arch/x86/boot/compressed/mem_encrypt.S10
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/x86/boot/compressed/mem_encrypt.S b/arch/x86/boot/compressed/mem_encrypt.S
index 14cf04a1ed09..e69674588a31 100644
--- a/arch/x86/boot/compressed/mem_encrypt.S
+++ b/arch/x86/boot/compressed/mem_encrypt.S
@@ -18,12 +18,7 @@
.text
.code32
SYM_FUNC_START(get_sev_encryption_bit)
- xor %eax, %eax
-
-#ifdef CONFIG_AMD_MEM_ENCRYPT
push %ebx
- push %ecx
- push %edx
movl $0x80000000, %eax /* CPUID to check the highest leaf */
cpuid
@@ -54,12 +49,7 @@ SYM_FUNC_START(get_sev_encryption_bit)
xor %eax, %eax
.Lsev_exit:
- pop %edx
- pop %ecx
pop %ebx
-
-#endif /* CONFIG_AMD_MEM_ENCRYPT */
-
RET
SYM_FUNC_END(get_sev_encryption_bit)