Skip to content

Commit

Permalink
crash_dump: Remove no longer used saved_max_pfn
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
ryncsn authored and suryasaimadhu committed Apr 15, 2020
1 parent 2fa9a3c commit 4c5b566
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
8 changes: 0 additions & 8 deletions arch/x86/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions include/linux/crash_dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
6 changes: 0 additions & 6 deletions kernel/crash_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
#include <linux/errno.h>
#include <linux/export.h>

/*
* 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
*
Expand Down

0 comments on commit 4c5b566

Please sign in to comment.