From patchwork Mon Nov 13 08:32: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: 164364 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1069213vqg; Mon, 13 Nov 2023 00:33:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqloAoeRp2K22p/xRXZNnYYUWkfgcc4oHv911BRWTlh59O0HwuhN5uD4cYsMnCRi3b/hC/ X-Received: by 2002:a17:902:ec81:b0:1cc:3bfc:69b1 with SMTP id x1-20020a170902ec8100b001cc3bfc69b1mr5050858plg.24.1699864408185; Mon, 13 Nov 2023 00:33:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699864408; cv=none; d=google.com; s=arc-20160816; b=j6SyalJSDEnpxz5LdwisnybQ9r7cmKYBnGpsE1JP5+zlsAiJl3sqv7EeBZ2MgiJWEj uSU+SS0ab+1w85MbP/ZIt8qL7UIE3UJHKR4mvpmpM87fzTy59Ds89TDCaAVOm+p1yh+D qgX6dUrnGujjAylwnVM+rXg3s/RqWQIVWb+UUra66Tsx2Awqcnvh8f81VVKQvCSl68zd 44EUSdDqFfuQJUf0C6Uf1Z3Vc5n/0dZ67fpiJduz9KuqBIkYLWPvSh4CPYvBvvjepxfm SS5Iq8KNsADar1SRBM1/2HKe0iGG/hkOMNcTglcv6Qce+gnJUziMPCWNLYDGwlAkBnkc iXaw== 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=ngF/T3wdSOnmGRV9g85/BDDi0rFblcD0V9ypYKd5sdA=; fh=OgPQWr2vKzUgu49jcKfnFcmxH+4sWXvcUnVsEKjeYII=; b=wdNPk+raSL2sO2Z2rM0kwynsKrEbSyHeojrAZTH0+vH39q+QUUM8GjLJk33SMx2ctT fjO5683O3PDTrbJISJlTmJwyRJ9mvwJPCXZjjmBCjv+jCeYli79OZ/dyHiznHUVqE8I7 57lx71BC0BjWkf+04n7haJPn4eicUKl5ci1oQpk93/NqUcHZ/atiaizRZcDGGdkrmsUM 5U96Wvn8q/o7SIvafUi8aOKq9SdGv7oRQn8lYqsl0JU1YqrjK1COJF/D+SPDseWp25Ps WEmIWnfKvAdEWwDZZRy3uR4gGFJRu9/c1dKHAFnAFp7oUcucHY6g8r8ZZm4ypSvi2lyl b57A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=VX+6aJjB; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id f14-20020a170902ce8e00b001c74ae78c7bsi5757250plg.377.2023.11.13.00.33.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 00:33:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=VX+6aJjB; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 6A36C8057E0D; Mon, 13 Nov 2023 00:33:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233183AbjKMIdC (ORCPT + 29 others); Mon, 13 Nov 2023 03:33:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbjKMIdA (ORCPT ); Mon, 13 Nov 2023 03:33:00 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3D3810F8; Mon, 13 Nov 2023 00:32:56 -0800 (PST) Date: Mon, 13 Nov 2023 08:32:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1699864374; 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=ngF/T3wdSOnmGRV9g85/BDDi0rFblcD0V9ypYKd5sdA=; b=VX+6aJjBnUq3/nFQEvaDtb6zUwnn6Fl/9QpGTqSEux7rf3YeJKcroIOBWcsq8Q1mRxvM6B ZFHpbvBhMQePTQ5FazcoJPCeguqL1GyEKHuxlsnw5s4sQQPgIpGMpObf2li3JYFYgad4gx az2w+5zIw4/6MDmdcIuOe4y5wEnlje4HcLA7wfW3bzgqzJGWFJUYdW9Pq7LXTJldavQgX1 3hAV1aXUn0/hIadPD/EgcSQvNh+1Wglkibrs6i2GotVZkja+cE1bWqBIwjrh8b77oXzyiE rl4AHQFY7VGy8JSSffvTebvY0e8BBq/dTA8Uqd6Y+vci3yOXZkuHC5CsgW6daQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1699864374; 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=ngF/T3wdSOnmGRV9g85/BDDi0rFblcD0V9ypYKd5sdA=; b=QfzRyNHJTvi1TPNSOcCIM8mJLJnHJSNOV7uVshiC+euHuvkC08h0VH/GH1R4EEZtUHaVvX wqRo8FIZvHZREJDg== From: "tip-bot2 for Yuntao Wang" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] x86/setup: Make relocated_ramdisk a local variable of relocate_initrd() Cc: Yuntao Wang , "Borislav Petkov (AMD)" , Baoquan He , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231113034026.130679-1-ytcoode@gmail.com> References: <20231113034026.130679-1-ytcoode@gmail.com> MIME-Version: 1.0 Message-ID: <169986437391.3135.15393709834682156361.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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, 13 Nov 2023 00:33:20 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782418855383901786 X-GMAIL-MSGID: 1782437021798084057 The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: f7a25cf1d4707da39b80df96a3be8a8abd07c35b Gitweb: https://git.kernel.org/tip/f7a25cf1d4707da39b80df96a3be8a8abd07c35b Author: Yuntao Wang AuthorDate: Mon, 13 Nov 2023 11:40:26 +08:00 Committer: Borislav Petkov (AMD) CommitterDate: Mon, 13 Nov 2023 09:09:37 +01:00 x86/setup: Make relocated_ramdisk a local variable of relocate_initrd() After 0b62f6cb0773 ("x86/microcode/32: Move early loading after paging enable"), the global variable relocated_ramdisk is no longer used anywhere except for the relocate_initrd() function. Make it a local variable of that function. Signed-off-by: Yuntao Wang Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Baoquan He Link: https://lore.kernel.org/r/20231113034026.130679-1-ytcoode@gmail.com --- arch/x86/include/asm/setup.h | 2 -- arch/x86/kernel/setup.c | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h index bf483fc..5c83729 100644 --- a/arch/x86/include/asm/setup.h +++ b/arch/x86/include/asm/setup.h @@ -31,8 +31,6 @@ #include #include -extern u64 relocated_ramdisk; - /* Interrupt control for vSMPowered x86_64 systems */ #ifdef CONFIG_X86_64 void vsmp_init(void); diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 1526747..ec2c21a 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -226,8 +226,6 @@ static void __init reserve_brk(void) _brk_start = 0; } -u64 relocated_ramdisk; - #ifdef CONFIG_BLK_DEV_INITRD static u64 __init get_ramdisk_image(void) @@ -261,7 +259,7 @@ static void __init relocate_initrd(void) u64 area_size = PAGE_ALIGN(ramdisk_size); /* We need to move the initrd down into directly mapped mem */ - relocated_ramdisk = memblock_phys_alloc_range(area_size, PAGE_SIZE, 0, + u64 relocated_ramdisk = memblock_phys_alloc_range(area_size, PAGE_SIZE, 0, PFN_PHYS(max_pfn_mapped)); if (!relocated_ramdisk) panic("Cannot find place for new RAMDISK of size %lld\n",