mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/boot: Drop erroneous __init annotation from early_set_pages_state()
@ 2025-09-24 15:53 Ard Biesheuvel
  2025-09-24 15:54 ` Ard Biesheuvel
  2025-09-24 16:16 ` [tip: x86/apic] " tip-bot2 for Ard Biesheuvel
  0 siblings, 2 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2025-09-24 15:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ard Biesheuvel, Borislav Petkov, Aithal, Srikanth,
	Sean Christopherson, Ashish Kalra, Tom Lendacky

From: Ard Biesheuvel <ardb@kernel.org>

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: faed658ce71d ("x86/boot: Move startup code out of __head section")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
Cc: Borislav Petkov <bp@alien8.de>
Cc: "Aithal, Srikanth" <sraithal@amd.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Ashish Kalra <Ashish.Kalra@amd.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>

 arch/x86/boot/startup/sev-startup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/startup/sev-startup.c b/arch/x86/boot/startup/sev-startup.c
index 39465a0ff4e5..c4c389f7cd06 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)
 {
-- 
2.51.0.534.gc79095c0ca-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-24 16:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-24 15:53 [PATCH] x86/boot: Drop erroneous __init annotation from early_set_pages_state() Ard Biesheuvel
2025-09-24 15:54 ` Ard Biesheuvel
2025-09-24 16:16 ` [tip: x86/apic] " tip-bot2 for Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®