From patchwork Fri Oct 20 11:38:05 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: 156077 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp995328vqb; Fri, 20 Oct 2023 04:48:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFvP75Wlhw5E2TbPfoqnQRbTcGES3CLJQ3VsnZIzXcRGlRu92+MZhseRlN4XAbDf5rKOXUg X-Received: by 2002:a62:f202:0:b0:6b6:7a04:6f9 with SMTP id m2-20020a62f202000000b006b67a0406f9mr1237046pfh.28.1697802511041; Fri, 20 Oct 2023 04:48:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697802511; cv=none; d=google.com; s=arc-20160816; b=sL8UcgYkL+YKdHe0kb2BckjWJyt2vGY0HNsgErnv0N6ilDecETwDzFtoOxSrCnbxm+ IE4kkINC72zIqmbx5OiOSmMkO2cZTIz7gQF4oYzG4Y4+d5Xqc2fYBAA/d0XpFVQbi7se GNVB1RZErmP7T0GTl6YJqQvwuXG5p5TRs7TQd8+iNbPdu3Rnp/JRuqFw1Nam50b8lowX nOyWUmRZOY4v/JK3H9APMuq6Ura6U5PoSyYKSAJNJUUF2YH74VUgDC6/f9fpdwvDJ7+E lVie+56JvJaIWo5UZgnMLfDqe8VkieYTfY95zg7z5Yy8PmI0jJkX4KaC88OBJOPrmrs+ azEA== 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=pBNE+8EPMj7eww5j+hq/3gwOlbiHLUHfMYuWVrgielU=; fh=LWlv3U+xZ3+vQt4tlJRIlKl5VzN7iFjjE/bzRmlxKDA=; b=hNsw7dGEYlLEZOrX0MpzkXxWhj1dEE/8P1qpFvrdNtqeBbuLhcHjQG+8KAAxbvI8HB QlAl2ty58301VHE0Xc2Ch3Vz4zbMuNIQo9zebTvPrQi1fpmyysJDGgw7ZOvayDK+AUjy mWHNPTOeEP+ubSx2ZwNCN8Kd/f+e59ITBF/CCVj6J/yg9prKiiAbBKlzLlhYN/VEIsVb /ToHZWp3UNiJi+U7jlDNyn2yD3Ys06ITXm6QERAJLsLVk6BLlwf7kBQhsUR5jvCiw880 20aYIE/rwpfGfWGqltEamPo3zkEUflbfx27fby7r/TOe2k3Tc8Z2aAU4X4WEGFMRWsqH 9/jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UMmf+KxW; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="/U2+wDzd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id w3-20020aa79a03000000b006b0cfed2c77si1726502pfj.135.2023.10.20.04.48.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 04:48:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UMmf+KxW; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="/U2+wDzd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 0FB23835939D; Fri, 20 Oct 2023 04:48:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377434AbjJTLsV (ORCPT + 25 others); Fri, 20 Oct 2023 07:48:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377345AbjJTLsI (ORCPT ); Fri, 20 Oct 2023 07:48:08 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B63D11BD3; Fri, 20 Oct 2023 04:39:00 -0700 (PDT) Date: Fri, 20 Oct 2023 11:38:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697801886; 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=pBNE+8EPMj7eww5j+hq/3gwOlbiHLUHfMYuWVrgielU=; b=UMmf+KxW4YZ5I2DQsBX2LALSvD0LhPKIS1ltOkbrJtESZdUqCuiz4NATGdulj0NR5T4ak2 s7A7W3XAN21iU7AdNYKS8go0/FERCj+VTKLjQvg5mVGCqXTKbVaOEAyTNJRtkSFH/kjLmr A2O/oCb9hQAQYkdhl7AGN0+Z5F4mjbV3jXNgmE0HbbLo3h86qgmGsX9L38GI182nCtVYpz 57WyxDZiYjW5YHBcOeWBIqZxLOzNlnNx5h5ApegTpqp9DPK/toOdDJuq+1L66C/Ez+MWev pZxK4gLEX77ifOH8f0HeHz+sIexz7tN5hf5KyF6qy21jbJC9Qeb9W5cUf53axQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697801886; 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=pBNE+8EPMj7eww5j+hq/3gwOlbiHLUHfMYuWVrgielU=; b=/U2+wDzdWQBxx+FLKZbGA8DkOYq2bCdrriTvfDUa3JYIMOXfg5lzOBqBJPUHwDbfqpy5+r lP+tZm0vC/er2hBg== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/microcode] x86/boot: Use __pa_nodebug() in mk_early_pgtbl_32() Cc: Thomas Gleixner , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231017211722.051625827@linutronix.de> References: <20231017211722.051625827@linutronix.de> MIME-Version: 1.0 Message-ID: <169780188542.3135.3956115458219517841.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 pete.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 (pete.vger.email [0.0.0.0]); Fri, 20 Oct 2023 04:48:28 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780039359288026168 X-GMAIL-MSGID: 1780274965849564795 The following commit has been merged into the x86/microcode branch of tip: Commit-ID: 1e2dd572d2b773b5b8882aae66e5f0328d562aa9 Gitweb: https://git.kernel.org/tip/1e2dd572d2b773b5b8882aae66e5f0328d562aa9 Author: Thomas Gleixner AuthorDate: Tue, 17 Oct 2023 23:23:25 +02:00 Committer: Borislav Petkov (AMD) CommitterDate: Wed, 18 Oct 2023 11:24:37 +02:00 x86/boot: Use __pa_nodebug() in mk_early_pgtbl_32() Use the existing macro instead of undefining and redefining __pa(). No functional change. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231017211722.051625827@linutronix.de --- arch/x86/kernel/head32.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c index bf678d6..8fe0dd3 100644 --- a/arch/x86/kernel/head32.c +++ b/arch/x86/kernel/head32.c @@ -73,25 +73,21 @@ void __init mk_early_pgtbl_32(void); void __init __no_stack_protector mk_early_pgtbl_32(void) { -#ifdef __pa -#undef __pa -#endif -#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET) pte_t pte, *ptep; int i; unsigned long *ptr; /* Enough space to fit pagetables for the low memory linear map */ - const unsigned long limit = __pa(_end) + + const unsigned long limit = __pa_nodebug(_end) + (PAGE_TABLE_SIZE(LOWMEM_PAGES) << PAGE_SHIFT); #ifdef CONFIG_X86_PAE - pmd_t pl2, *pl2p = (pmd_t *)__pa(initial_pg_pmd); + pmd_t pl2, *pl2p = (pmd_t *)__pa_nodebug(initial_pg_pmd); #define SET_PL2(pl2, val) { (pl2).pmd = (val); } #else - pgd_t pl2, *pl2p = (pgd_t *)__pa(initial_page_table); + pgd_t pl2, *pl2p = (pgd_t *)__pa_nodebug(initial_page_table); #define SET_PL2(pl2, val) { (pl2).pgd = (val); } #endif - ptep = (pte_t *)__pa(__brk_base); + ptep = (pte_t *)__pa_nodebug(__brk_base); pte.pte = PTE_IDENT_ATTR; while ((pte.pte & PTE_PFN_MASK) < limit) { @@ -111,11 +107,11 @@ void __init __no_stack_protector mk_early_pgtbl_32(void) pl2p++; } - ptr = (unsigned long *)__pa(&max_pfn_mapped); + ptr = (unsigned long *)__pa_nodebug(&max_pfn_mapped); /* Can't use pte_pfn() since it's a call with CONFIG_PARAVIRT */ *ptr = (pte.pte & PTE_PFN_MASK) >> PAGE_SHIFT; - ptr = (unsigned long *)__pa(&_brk_end); + ptr = (unsigned long *)__pa_nodebug(&_brk_end); *ptr = (unsigned long)ptep + PAGE_OFFSET; }