From patchwork Mon Oct 16 11:54:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 153363 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3406077vqb; Mon, 16 Oct 2023 05:01:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHBaPUVR6BgCTrNLWOrCMKrSyNAYy/86MniHnfW/Hba4f9DBVUFZ2JnvSEcV1JaunDPgtFl X-Received: by 2002:a17:902:e28b:b0:1c9:e48c:7260 with SMTP id o11-20020a170902e28b00b001c9e48c7260mr11081230plc.6.1697457688040; Mon, 16 Oct 2023 05:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697457688; cv=none; d=google.com; s=arc-20160816; b=VDAwhZz8GgQkTutR28blQsE7BI0YThaDj/RFLEPW7eOxatHVlEAucEIkkwfb/4EV8w Migpct4DvWvFNgkjpOMPumGU+Mpi10Bh+y9VjicjqUXIlid4aCbTQQE65dcZIiQnH3rw 9ADx1557Lhoi9qQhak+CtvFu91ri8HfUGX5s3wi/zBRYt5pnTzl2wyxy4ez8jCDUudU1 F/1Z9FhsA1GYWX4Ytsi+1nGolEh1hQVYJZRMq1gAKyYq0yqHeFhA+OPoLKeCEG9nxr4C 2D80ZLHFv+rkE0e5EwZunjyP75Vlidx3VU14bxFbb0EEGNzbj054EF5l5egyzKkU6oLf fO/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=XHVesqXaxohiYRrNpUQZ4HWFsNQ+2Xf+xlrKQBGONto=; fh=7ceUX0iZe7PTEiqXflH57MwSIol+1JKVWPZm5EtuIbo=; b=dGCQUWvILMr1bM7vBnQ3UKn7lQ8c0n2aY5HKRorrDy4MjKIakqX9BMLpNw9W7CZsQ9 6u58cyez4QHOdC99wfnan7JvBAzjQiMFnAxv2AA9fk4Y3n1Cx6YlITFdK2ZvzCqQtYjQ zDUlf7SK+B0AXDay+1u9+PleG9rx4Hi1eISXKD5KJ+dUmk7S9z/bpMu3bHJ+Bv/yrDZ7 DrqcPL53ZX+YvtTQCe+UIKLqDCI6wBQNvrNvIVxVH71RnZwGlAPgfIggxWTWzIu6JmuX D/bNsbpJO5nBpXmmkjYAng3aZUVN7WTRM0n+XqkKx2wnVkF7PpwV0eCH6LZ/rOjKaKnf 87tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Ye4vv+xD; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=gtzIq0dA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id z6-20020a1709027e8600b001bb8a57d518si10496096pla.379.2023.10.16.05.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 05:01:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Ye4vv+xD; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=gtzIq0dA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 17C98807C550; Mon, 16 Oct 2023 05:01:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230514AbjJPMBE (ORCPT + 18 others); Mon, 16 Oct 2023 08:01:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231302AbjJPMBC (ORCPT ); Mon, 16 Oct 2023 08:01:02 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B8AC18F; Mon, 16 Oct 2023 04:54:55 -0700 (PDT) Date: Mon, 16 Oct 2023 11:54:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697457294; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XHVesqXaxohiYRrNpUQZ4HWFsNQ+2Xf+xlrKQBGONto=; b=Ye4vv+xDCsDLAD0XEjFzyD8wC015h/OLrmCi/fram6Gjf5OG0JMgBavI6zRPmWrYlk0AXY FJ+5Xof1ZhKK5fF/juMUbsW5Tp8bVS2ZwU/zGpdHgc6Yk7brgJShEp4ydiQ+y3PxayzSp7 zPHAImr+QAGjMaYZl8N5p/hpdmaNPY65lZolt7/KsOBsTlOXJHlorWmAHSrPIuaEXGmfc3 yOyWJTbY9W+FgjIlsQPb+PmR0UUpllsHRFj33OORtAlcnKynpugSgSnaAkRUrPhrNVMifr +oANxe0uZ1duh3+B0lsZ7PJ0u7ySj67MbN9g0R1JDtsGvb066LMqJUexsRV++g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697457294; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XHVesqXaxohiYRrNpUQZ4HWFsNQ+2Xf+xlrKQBGONto=; b=gtzIq0dA9GIJWeyeJqgcpcVfzSr5NB99ElCg++m0xpyFXTDacGzeskCd28TK/YpKwkrMsz PrDfztAWkmKI//Bw== From: "tip-bot2 for Hou Wenlong" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/boot] x86/head/64: Mark 'startup_gdt[]' and 'startup_gdt_descr' as __initdata Cc: Hou Wenlong , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: =?utf-8?q?=3Cc85903a7cfad37d14a7e5a4df9fc7119a3669fb3=2E1689130?= =?utf-8?q?310=2Egit=2Ehouwenlong=2Ehwl=40antgroup=2Ecom=3E?= References: =?utf-8?q?=3Cc85903a7cfad37d14a7e5a4df9fc7119a3669fb3=2E16891303?= =?utf-8?q?10=2Egit=2Ehouwenlong=2Ehwl=40antgroup=2Ecom=3E?= MIME-Version: 1.0 Message-ID: <169745729358.3135.16557655752010416228.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 16 Oct 2023 05:01:24 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779913392441568819 X-GMAIL-MSGID: 1779913392441568819 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 AuthorDate: Wed, 12 Jul 2023 11:30:05 +08:00 Committer: Ingo Molnar 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 Signed-off-by: Ingo Molnar 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, };