From: Ard Biesheuvel Date: Wed, 24 Sep 2025 15:53:11 +0000 (+0200) Subject: x86/boot: Drop erroneous __init annotation from early_set_pages_state() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f6113ae5ac4927fe80256154ebb0461e670fa85;p=thirdparty%2Fkernel%2Fstable.git x86/boot: Drop erroneous __init annotation from early_set_pages_state() The kexec code will call set_pages_state() after tearing down all the GHCBs, which will therefore result in a call to early_set_pages_state(). This means the __init annotation is wrong, and must be dropped. Fixes: c5c30a373693 ("x86/boot: Move startup code out of __head section") Reported-by: Srikanth Aithal Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov (AMD) Tested-by: Srikanth Aithal --- diff --git a/arch/x86/boot/startup/sev-startup.c b/arch/x86/boot/startup/sev-startup.c index a9b0a9c32d8ff..09725428d3e65 100644 --- a/arch/x86/boot/startup/sev-startup.c +++ b/arch/x86/boot/startup/sev-startup.c @@ -44,7 +44,7 @@ /* Include code shared with pre-decompression boot stage */ #include "sev-shared.c" -void __init +void early_set_pages_state(unsigned long vaddr, unsigned long paddr, unsigned long npages, const struct psc_desc *desc) {