Skip to content

Commit 4c5b566

Browse files
ryncsnsuryasaimadhu
authored andcommitted
crash_dump: Remove no longer used saved_max_pfn
saved_max_pfn was originally introduced in commit 92aa63a ("[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 921d58c ("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 <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Acked-by: "Eric W. Biederman" <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 2fa9a3c commit 4c5b566

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

arch/x86/kernel/e820.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -910,14 +910,6 @@ static int __init parse_memmap_one(char *p)
910910
return -EINVAL;
911911

912912
if (!strncmp(p, "exactmap", 8)) {
913-
#ifdef CONFIG_CRASH_DUMP
914-
/*
915-
* If we are doing a crash dump, we still need to know
916-
* the real memory size before the original memory map is
917-
* reset.
918-
*/
919-
saved_max_pfn = e820__end_of_ram_pfn();
920-
#endif
921913
e820_table->nr_entries = 0;
922914
userdef = 1;
923915
return 0;

include/linux/crash_dump.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ extern void unregister_oldmem_pfn_is_ram(void);
9797
static inline bool is_kdump_kernel(void) { return 0; }
9898
#endif /* CONFIG_CRASH_DUMP */
9999

100-
extern unsigned long saved_max_pfn;
101-
102100
/* Device Dump information to be filled by drivers */
103101
struct vmcoredd_data {
104102
char dump_name[VMCOREDD_MAX_NAME_BYTES]; /* Unique name of the dump */

kernel/crash_dump.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
#include <linux/errno.h>
66
#include <linux/export.h>
77

8-
/*
9-
* If we have booted due to a crash, max_pfn will be a very low value. We need
10-
* to know the amount of memory that the previous kernel used.
11-
*/
12-
unsigned long saved_max_pfn;
13-
148
/*
159
* stores the physical address of elf header of crash image
1610
*

0 commit comments

Comments
 (0)