Re: [PATCH 01/11] x86/sev: Rename snp_init() in the boot/compressed/sev.c file

From: Tom Lendacky
Date: Sat Jan 27 2024 - 09:38:22 EST


On 1/26/24 18:05, Dionna Amalie Glaze wrote:
On Fri, Jan 26, 2024 at 2:16 PM Tom Lendacky <thomas.lendacky@xxxxxxx> wrote:

The snp_init() function is local to the boot/compressed/sev.c file and is
not called from outside of the file. Change the name so that it is not
tied to the function definition in arch/x86/include/asm/sev.h. Move the
renamed snp_init() and related functions up in the file to avoid having to
add a forward declaration and make the function static, too.

This will allow the snp_init() function in arch/x86/kernel/sev.c to be
changed without having to make the same change in boot/compressed/sev.c.

Signed-off-by: Tom Lendacky <thomas.lendacky@xxxxxxx>
---
arch/x86/boot/compressed/sev.c | 162 ++++++++++++++++-----------------
1 file changed, 81 insertions(+), 81 deletions(-)

diff --git a/arch/x86/boot/compressed/sev.c b/arch/x86/boot/compressed/sev.c
index 454acd7a2daf..c3030cfb6484 100644
--- a/arch/x86/boot/compressed/sev.c
+++ b/arch/x86/boot/compressed/sev.c


Did some kind of whitespace replacement happen accidentally? There's a
lot that isn't changed but the diff is quite big.

No whitespace damage. As mentioned in the commit log, the functions were moved within the file to avoid forward declarations.

Thanks,
Tom


void sev_prep_identity_maps(unsigned long top_level_pgt)
{
/*
--
2.42.0