From patchwork Tue Oct 17 13:03:51 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: 154264 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4117272vqb; Tue, 17 Oct 2023 06:04:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAcApUCtt/91QubWZQ31CMWYsjvj6Z3xPubY0LpdLKJZLx8uRhkkw/z42VMBeLgt5MIplE X-Received: by 2002:a17:902:7893:b0:1c9:e121:ccc1 with SMTP id q19-20020a170902789300b001c9e121ccc1mr2231431pll.5.1697547863680; Tue, 17 Oct 2023 06:04:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697547863; cv=none; d=google.com; s=arc-20160816; b=Xb1grCOYk1aZvpUbZmPvb0lZ/xgMMQMB2F5tsdbiXc7qqMUFeKMakmItTd+embPrOa nMjVoJ6/Bghg26G0Ual8J8MOPnL05dluPNnIb+3zBRbunsXU2HKoqjUheOTwhsKAXzD0 WUuoBfhLgBMfbhArmyoGm4p7etKwV9FNFJ1CghAwXfN1nueXWRM9I89YXVeX7fpolVjP Bls+cvXVSRBV4P2aZhxTS58AXQG0eWx7KMCYgBPHa4ZNgRQn4vt9X7jFdi1o2aSmdOjy ckuX05mfFcOSlDZSC+WREO9uJPzPB2uMGQeMb2ck2BULe/U3e6gDe1C86aj+X10I9ta7 9O1w== 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=Ur0pleNbPVSpL3C6zvCe1LDhu7aAMmrcgKf1Wg1xeZQ=; fh=7ceUX0iZe7PTEiqXflH57MwSIol+1JKVWPZm5EtuIbo=; b=hTIpsuGA6L/T6ZqifKPD9YaGM9AbPq28oMzz/evgBeU8iwxaCeg5Q1LlgRnxO3YI8J 6ga/PXKP4EemkMQaPijX6qGz+fWLBB3VYcwtUl60uAvaeBnsCMvKapicKBYjsmVjYStL 16rOIoJ7+mERo1Bjiya+pzz/a6g8jMnwEBUid0+ibNGwUUbyWQvrM5xIFAZQIUDQC+pT uvAbq7Qu/U2SrMGcp0XUPskPJqi1fj10beA2tfkR55U3EI8a/bOqtx5afJpeWXztrlS9 EU6iYGZOU0HsNmi/9b7I3oO+Rl4BGnWJX/ME3ahQo9ok/1ExL7Kv3t5Om7fE7aGcmKEe g32g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CZaMLbgb; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id l3-20020a170903244300b001c74ae78c7bsi1766532pls.377.2023.10.17.06.04.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 06:04:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CZaMLbgb; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 0125A8028B6B; Tue, 17 Oct 2023 06:04:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343737AbjJQNED (ORCPT + 19 others); Tue, 17 Oct 2023 09:04:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343824AbjJQNDy (ORCPT ); Tue, 17 Oct 2023 09:03:54 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 986F283; Tue, 17 Oct 2023 06:03:53 -0700 (PDT) Date: Tue, 17 Oct 2023 13:03:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697547832; 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=Ur0pleNbPVSpL3C6zvCe1LDhu7aAMmrcgKf1Wg1xeZQ=; b=CZaMLbgbJeWUKM3XEnVT0+M7XAQZmQ6e5LUiTdA3mOM5gUtmsKpQcq95YtpoZPJvN2FyOq KVnrfVa0K3bQUYfqiH/vGyZ1QpIFohgKeGUaaRB7FKbegAu/7vbG6qiek+8GlaNwLSY5fZ CiVLIc9fXWNOMoKOTI7eEHQ9yEoOEHR8XjFcnGhwv+sDamRX8Yc+o+XhCsuUomJjd7mCZq c9f0RnfAzzu3/YqjfJ8utR5N0Ndvl8/cBvJlQ3CBzlijaxee5/4qI3nESUZj42tmHWSFpC NIs3t7CyRHjNDFCKu3rJlAfwNSx/EJvOdRitbrZVh8MRpGU6A2E71cpVWsHQTw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697547832; 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=Ur0pleNbPVSpL3C6zvCe1LDhu7aAMmrcgKf1Wg1xeZQ=; b=eLEYs+CZjIc5hwPuN12vOfUp6LVpq4Jc3wKLhSOgauQbabQ/X0vesrjZVWyd2ZNqhuH7gC UpYB95S5DiuoJCBQ== 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: Move the __head definition to Cc: Hou Wenlong , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: =?utf-8?q?=3C0583f57977be184689c373fe540cbd7d85ca2047=2E1697525?= =?utf-8?q?407=2Egit=2Ehouwenlong=2Ehwl=40antgroup=2Ecom=3E?= References: =?utf-8?q?=3C0583f57977be184689c373fe540cbd7d85ca2047=2E16975254?= =?utf-8?q?07=2Egit=2Ehouwenlong=2Ehwl=40antgroup=2Ecom=3E?= MIME-Version: 1.0 Message-ID: <169754783149.3135.16164318910465112906.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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 17 Oct 2023 06:04:08 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779985592314261073 X-GMAIL-MSGID: 1780007948858935227 The following commit has been merged into the x86/boot branch of tip: Commit-ID: d2a285d65bfde3218fd0c3b88794d0135ced680b Gitweb: https://git.kernel.org/tip/d2a285d65bfde3218fd0c3b88794d0135ced680b Author: Hou Wenlong AuthorDate: Tue, 17 Oct 2023 15:08:06 +08:00 Committer: Ingo Molnar CommitterDate: Tue, 17 Oct 2023 14:51:14 +02:00 x86/head/64: Move the __head definition to Move the __head section definition to a header to widen its use. An upcoming patch will mark the code as __head in mem_encrypt_identity.c too. Signed-off-by: Hou Wenlong Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/0583f57977be184689c373fe540cbd7d85ca2047.1697525407.git.houwenlong.hwl@antgroup.com --- arch/x86/include/asm/init.h | 2 ++ arch/x86/kernel/head64.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/init.h b/arch/x86/include/asm/init.h index 5f1d3c4..cc9ccf6 100644 --- a/arch/x86/include/asm/init.h +++ b/arch/x86/include/asm/init.h @@ -2,6 +2,8 @@ #ifndef _ASM_X86_INIT_H #define _ASM_X86_INIT_H +#define __head __section(".head.text") + struct x86_mapping_info { void *(*alloc_pgt_page)(void *); /* allocate buf for page table */ void *context; /* context for alloc_pgt_page */ diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index f0efc22..05a110c 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -41,6 +41,7 @@ #include #include #include +#include /* * Manage page tables very early on. @@ -84,8 +85,6 @@ static struct desc_ptr startup_gdt_descr __initdata = { .address = 0, }; -#define __head __section(".head.text") - static void __head *fixup_pointer(void *ptr, unsigned long physaddr) { return ptr - (void *)_text + (void *)physaddr;