Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp645316ybz; Wed, 15 Apr 2020 15:51:26 -0700 (PDT) X-Google-Smtp-Source: APiQypJD8GaUdrW/bXJnHudjjmRMiIXSkoJNcu5Ep0+x8NgouTf0tpA8RjLwWwprbDWExfnGG4XX X-Received: by 2002:a17:906:160f:: with SMTP id m15mr6866341ejd.367.1586991086010; Wed, 15 Apr 2020 15:51:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586991086; cv=none; d=google.com; s=arc-20160816; b=lRlpZ0MEC+yt8vaW0RnyioM6jQa17pSJLvLM6xkr4O0BMCb2SMKxHZjs3/MDkBCJxI RKMLG90G+lCV42gWSwOtf7nvwp+2pdyQ7zsrCzP81E7HHJ2B4MrZqOae1ospwQJy/i1m //DHNh9M9WIoG+u67KwtF7/19eZO9Si32YcLsHAOZUpxavXD1rCHfk8M21PTYzkyCXcG l3uyvEtZJ/N1a91iTQp8ceo/5WJKaJDWN20QrMug/9oEjhncMn0X9GuiMuhhwFN046nR +mSei9usn+LZMoV9Fam7Qdrvm233p4PpZvDNQOA02p49U2i80Czc07/qFYYZL+Aik8nv 7BYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=4sR1gnYyX0jXws2HrxBb1LOcvPVsfAEsqe86sc3gGF0=; b=K2b0zBUqdrpAFngaTxhYjwM5uoUY4lDwXvWTCUzGEQ3Z/8ek5xNWkbsQtdZVQE4Yoo 8aMzq5YHhsot4gT69Q8BLDUKEZXLxjOxIqDTnyPuzSh1rUbj3rBfkMo29aju6OkkSB/e YJCtgZGEYA+6/EM+1FdYRWHd65SH3oRz0CO7Il46oGZh0BQYTzW8eTpGQPWQHci2PnIM jmkS6z7d1Atst29VMjIMQsaC6OpWFhSkquHrQDYsvDstu98lmOufQPFzxvmVH4CK7no2 l3e6ulfJpP7LtdySbt3GE5ed1ab9vZRSILMFSe17Yk0iDPOOtMXtngWow0EfHyojfmLq psVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn14si14348305ejc.261.2020.04.15.15.51.02; Wed, 15 Apr 2020 15:51:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2895588AbgDOJcd (ORCPT + 99 others); Wed, 15 Apr 2020 05:32:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2895564AbgDOJc3 (ORCPT ); Wed, 15 Apr 2020 05:32:29 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84F9BC061A0C; Wed, 15 Apr 2020 02:32:29 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jOePB-0005Xm-66; Wed, 15 Apr 2020 11:32:25 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id B31131C0081; Wed, 15 Apr 2020 11:32:24 +0200 (CEST) Date: Wed, 15 Apr 2020 09:32:24 -0000 From: "tip-bot2 for Kairui Song" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] crash_dump: Remove no longer used saved_max_pfn Cc: Kairui Song , Borislav Petkov , "Eric W. Biederman" , x86 , LKML In-Reply-To: <20200330181544.1595733-1-kasong@redhat.com> References: <20200330181544.1595733-1-kasong@redhat.com> MIME-Version: 1.0 Message-ID: <158694314428.28353.3558515515241070907.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: 4c5b566c2193e2af82c891daa5303c8899e61044 Gitweb: https://git.kernel.org/tip/4c5b566c2193e2af82c891daa5303c8899e61044 Author: Kairui Song AuthorDate: Tue, 31 Mar 2020 02:15:44 +08:00 Committer: Borislav Petkov CommitterDate: Wed, 15 Apr 2020 11:21:54 +02:00 crash_dump: Remove no longer used saved_max_pfn saved_max_pfn was originally introduced in commit 92aa63a5a1bf ("[PATCH] kdump: Retrieve saved max pfn") It used to make sure that the user does not try to read the physical memory beyond saved_max_pfn. But since commit 921d58c0e699 ("vmcore: remove saved_max_pfn check") it's no longer used for the check. This variable doesn't have any users anymore so just remove it. [ bp: Drop the Calgary IOMMU reference from the commit message. ] Signed-off-by: Kairui Song Signed-off-by: Borislav Petkov Acked-by: "Eric W. Biederman" Link: https://lkml.kernel.org/r/20200330181544.1595733-1-kasong@redhat.com --- arch/x86/kernel/e820.c | 8 -------- include/linux/crash_dump.h | 2 -- kernel/crash_dump.c | 6 ------ 3 files changed, 16 deletions(-) diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index c5399e8..4d13c57 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -910,14 +910,6 @@ static int __init parse_memmap_one(char *p) return -EINVAL; if (!strncmp(p, "exactmap", 8)) { -#ifdef CONFIG_CRASH_DUMP - /* - * If we are doing a crash dump, we still need to know - * the real memory size before the original memory map is - * reset. - */ - saved_max_pfn = e820__end_of_ram_pfn(); -#endif e820_table->nr_entries = 0; userdef = 1; return 0; diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index 4664fc1..bc15628 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h @@ -97,8 +97,6 @@ extern void unregister_oldmem_pfn_is_ram(void); static inline bool is_kdump_kernel(void) { return 0; } #endif /* CONFIG_CRASH_DUMP */ -extern unsigned long saved_max_pfn; - /* Device Dump information to be filled by drivers */ struct vmcoredd_data { char dump_name[VMCOREDD_MAX_NAME_BYTES]; /* Unique name of the dump */ diff --git a/kernel/crash_dump.c b/kernel/crash_dump.c index 9c23ae0..92da322 100644 --- a/kernel/crash_dump.c +++ b/kernel/crash_dump.c @@ -6,12 +6,6 @@ #include /* - * If we have booted due to a crash, max_pfn will be a very low value. We need - * to know the amount of memory that the previous kernel used. - */ -unsigned long saved_max_pfn; - -/* * stores the physical address of elf header of crash image * * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by