mirror of
https://github.com/torvalds/linux.git
synced 2026-12-06 13:23:45 +00:00
x86/kexec: Remove walk_iomem_res() call with GART type
There is no longer any driver inserting a "GART" region in the
kernel since
707d4eefbd ("Revert "[PATCH] Insert GART region into resource map"").
Remove the call to walk_iomem_res() with "GART" type, its
callback function, and GART-specific variables set by the
callback.
Signed-off-by: Toshi Kani <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Dave Young <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Chun-Yi <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Lee, Chun-Yi <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Luis R. Rodriguez <[email protected]>
Cc: Minfei Huang <[email protected]>
Cc: Peter Zijlstra (Intel) <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Cc: Takao Indoh <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Toshi Kani <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: linux-mm <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
+1
-36
@@ -57,10 +57,9 @@ struct crash_elf_data {
|
||||
struct kimage *image;
|
||||
/*
|
||||
* Total number of ram ranges we have after various adjustments for
|
||||
* GART, crash reserved region etc.
|
||||
* crash reserved region, etc.
|
||||
*/
|
||||
unsigned int max_nr_ranges;
|
||||
unsigned long gart_start, gart_end;
|
||||
|
||||
/* Pointer to elf header */
|
||||
void *ehdr;
|
||||
@@ -201,17 +200,6 @@ static int get_nr_ram_ranges_callback(u64 start, u64 end, void *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_gart_ranges_callback(u64 start, u64 end, void *arg)
|
||||
{
|
||||
struct crash_elf_data *ced = arg;
|
||||
|
||||
ced->gart_start = start;
|
||||
ced->gart_end = end;
|
||||
|
||||
/* Not expecting more than 1 gart aperture */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Gather all the required information to prepare elf headers for ram regions */
|
||||
static void fill_up_crash_elf_data(struct crash_elf_data *ced,
|
||||
@@ -226,22 +214,6 @@ static void fill_up_crash_elf_data(struct crash_elf_data *ced,
|
||||
|
||||
ced->max_nr_ranges = nr_ranges;
|
||||
|
||||
/*
|
||||
* We don't create ELF headers for GART aperture as an attempt
|
||||
* to dump this memory in second kernel leads to hang/crash.
|
||||
* If gart aperture is present, one needs to exclude that region
|
||||
* and that could lead to need of extra phdr.
|
||||
*/
|
||||
walk_iomem_res("GART", IORESOURCE_MEM, 0, -1,
|
||||
ced, get_gart_ranges_callback);
|
||||
|
||||
/*
|
||||
* If we have gart region, excluding that could potentially split
|
||||
* a memory range, resulting in extra header. Account for that.
|
||||
*/
|
||||
if (ced->gart_end)
|
||||
ced->max_nr_ranges++;
|
||||
|
||||
/* Exclusion of crash region could split memory ranges */
|
||||
ced->max_nr_ranges++;
|
||||
|
||||
@@ -350,13 +322,6 @@ static int elf_header_exclude_ranges(struct crash_elf_data *ced,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Exclude GART region */
|
||||
if (ced->gart_end) {
|
||||
ret = exclude_mem_range(cmem, ced->gart_start, ced->gart_end);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user