From: Ard Biesheuvel <ardb+git@google.com>
To: linux-kernel@vger.kernel.org
Cc: Ard Biesheuvel <ardb@kernel.org>, Borislav Petkov <bp@alien8.de>,
"Aithal, Srikanth" <sraithal@amd.com>,
Sean Christopherson <seanjc@google.com>,
Ashish Kalra <Ashish.Kalra@amd.com>,
Tom Lendacky <thomas.lendacky@amd.com>
Subject: [PATCH] x86/boot: Drop erroneous __init annotation from early_set_pages_state()
Date: Wed, 24 Sep 2025 17:53:11 +0200 [thread overview]
Message-ID: <20250924155310.3341370-2-ardb+git@google.com> (raw)
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
next reply other threads:[~2025-09-24 15:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 15:53 Ard Biesheuvel [this message]
2025-09-24 15:54 ` [PATCH] x86/boot: Drop erroneous __init annotation from early_set_pages_state() Ard Biesheuvel
2025-09-24 16:16 ` [tip: x86/apic] " tip-bot2 for Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250924155310.3341370-2-ardb+git@google.com \
--to=ardb+git@google.com \
--cc=Ashish.Kalra@amd.com \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=seanjc@google.com \
--cc=sraithal@amd.com \
--cc=thomas.lendacky@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.