Skip to content

Commit 007b756

Browse files
amlutoIngo Molnar
authored andcommitted
x86/boot: Run reserve_bios_regions() after we initialize the memory map
reserve_bios_regions() is a quirk that reserves memory that we might otherwise think is available. There's no need to run it so early, and running it before we have the memory map initialized with its non-quirky inputs makes it hard to make reserve_bios_regions() more intelligent. Move it right after we populate the memblock state. Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mario Limonciello <mario_limonciello@dell.com> Cc: Matt Fleming <mfleming@suse.de> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/59f58618911005c799c6c9979ce6ae4881d907c2.1470821230.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 82ba4fa commit 007b756

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

arch/x86/kernel/head32.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ static void __init i386_default_early_setup(void)
2525
/* Initialize 32bit specific setup functions */
2626
x86_init.resources.reserve_resources = i386_reserve_resources;
2727
x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc;
28-
29-
reserve_bios_regions();
3028
}
3129

3230
asmlinkage __visible void __init i386_start_kernel(void)

arch/x86/kernel/head64.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ void __init x86_64_start_reservations(char *real_mode_data)
183183
copy_bootdata(__va(real_mode_data));
184184

185185
x86_early_init_platform_quirks();
186-
reserve_bios_regions();
187186

188187
switch (boot_params.hdr.hardware_subarch) {
189188
case X86_SUBARCH_INTEL_MID:

arch/x86/kernel/setup.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,8 @@ void __init setup_arch(char **cmdline_p)
11011101
efi_find_mirror();
11021102
}
11031103

1104+
reserve_bios_regions();
1105+
11041106
/*
11051107
* The EFI specification says that boot service code won't be called
11061108
* after ExitBootServices(). This is, in fact, a lie.

0 commit comments

Comments
 (0)