mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Hou Wenlong" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Hou Wenlong <houwenlong.hwl@antgroup.com>,
	Ingo Molnar <mingo@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/boot] x86/head/64: Mark 'startup_gdt[]' and 'startup_gdt_descr' as __initdata
Date: Mon, 16 Oct 2023 11:54:53 -0000	[thread overview]
Message-ID: <169745729358.3135.16557655752010416228.tip-bot2@tip-bot2> (raw)
In-Reply-To: =?utf-8?q?=3Cc85903a7cfad37d14a7e5a4df9fc7119a3669fb3=2E16891?= =?utf-8?q?30310=2Egit=2Ehouwenlong=2Ehwl=40antgroup=2Ecom=3E?=

The following commit has been merged into the x86/boot branch of tip:

Commit-ID:     dc6283009016acd5a8c6a6c073506d82bbc55529
Gitweb:        https://git.kernel.org/tip/dc6283009016acd5a8c6a6c073506d82bbc55529
Author:        Hou Wenlong <houwenlong.hwl@antgroup.com>
AuthorDate:    Wed, 12 Jul 2023 11:30:05 +08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Mon, 16 Oct 2023 13:38:24 +02:00

x86/head/64: Mark 'startup_gdt[]' and 'startup_gdt_descr' as __initdata

As 'startup_gdt[]' and 'startup_gdt_descr' are only used in booting,
mark them as __initdata to allow them to be freed after boot.

Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/c85903a7cfad37d14a7e5a4df9fc7119a3669fb3.1689130310.git.houwenlong.hwl@antgroup.com
---
 arch/x86/kernel/head64.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index d6ca9c5..f41625d 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -69,7 +69,7 @@ EXPORT_SYMBOL(vmemmap_base);
 /*
  * GDT used on the boot CPU before switching to virtual addresses.
  */
-static struct desc_struct startup_gdt[GDT_ENTRIES] = {
+static struct desc_struct startup_gdt[GDT_ENTRIES] __initdata = {
 	[GDT_ENTRY_KERNEL32_CS]         = GDT_ENTRY_INIT(0xc09b, 0, 0xfffff),
 	[GDT_ENTRY_KERNEL_CS]           = GDT_ENTRY_INIT(0xa09b, 0, 0xfffff),
 	[GDT_ENTRY_KERNEL_DS]           = GDT_ENTRY_INIT(0xc093, 0, 0xfffff),
@@ -79,7 +79,7 @@ static struct desc_struct startup_gdt[GDT_ENTRIES] = {
  * Address needs to be set at runtime because it references the startup_gdt
  * while the kernel still uses a direct mapping.
  */
-static struct desc_ptr startup_gdt_descr = {
+static struct desc_ptr startup_gdt_descr __initdata = {
 	.size = sizeof(startup_gdt)-1,
 	.address = 0,
 };

                 reply	other threads:[~2023-10-16 12:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=169745729358.3135.16557655752010416228.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=houwenlong.hwl@antgroup.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=x86@kernel.org \
    /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 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®