diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-27 16:36:09 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-27 16:36:09 +0200 |
| commit | 5ecb11dd892f443d4900292edaba88a26efee8fe (patch) | |
| tree | d92c07b74431f862289a86230c66e2ef790f8980 /arch/x86/kernel/setup.c | |
| parent | 7c783601a3bc22a54cce0fb650259a983c8cafba (diff) | |
| parent | 5816b3e6577eaa676ceb00a848f0fd65fe2adc29 (diff) | |
| download | linux-5ecb11dd892f443d4900292edaba88a26efee8fe.tar.gz linux-5ecb11dd892f443d4900292edaba88a26efee8fe.tar.bz2 linux-5ecb11dd892f443d4900292edaba88a26efee8fe.zip | |
Merge 5.15-rc3 into tty-next
We need the tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/kernel/setup.c')
| -rw-r--r-- | arch/x86/kernel/setup.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 79f164141116..40ed44ead063 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -830,6 +830,20 @@ void __init setup_arch(char **cmdline_p) x86_init.oem.arch_setup(); + /* + * Do some memory reservations *before* memory is added to memblock, so + * memblock allocations won't overwrite it. + * + * After this point, everything still needed from the boot loader or + * firmware or kernel text should be early reserved or marked not RAM in + * e820. All other memory is free game. + * + * This call needs to happen before e820__memory_setup() which calls the + * xen_memory_setup() on Xen dom0 which relies on the fact that those + * early reservations have happened already. + */ + early_reserve_memory(); + iomem_resource.end = (1ULL << boot_cpu_data.x86_phys_bits) - 1; e820__memory_setup(); parse_setup_data(); @@ -876,18 +890,6 @@ void __init setup_arch(char **cmdline_p) parse_early_param(); - /* - * Do some memory reservations *before* memory is added to - * memblock, so memblock allocations won't overwrite it. - * Do it after early param, so we could get (unlikely) panic from - * serial. - * - * After this point everything still needed from the boot loader or - * firmware or kernel text should be early reserved or marked not - * RAM in e820. All other memory is free game. - */ - early_reserve_memory(); - #ifdef CONFIG_MEMORY_HOTPLUG /* * Memory used by the kernel cannot be hot-removed because Linux |
