Commit c76a4a07 authored by Juergen Gross's avatar Juergen Gross Committed by Greg Kroah-Hartman

efi: Don't issue error message when booted under Xen

commit 1ea34adb upstream.

When booted as Xen dom0 there won't be an EFI memmap allocated. Avoid
issuing an error message in this case:

  [    0.144079] efi: Failed to allocate new EFI memmap
Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarMatt Fleming <matt@codeblueprint.co.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20170526113652.21339-2-matt@codeblueprint.co.ukSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b8745dbb
...@@ -358,6 +358,9 @@ void __init efi_free_boot_services(void) ...@@ -358,6 +358,9 @@ void __init efi_free_boot_services(void)
free_bootmem_late(start, size); free_bootmem_late(start, size);
} }
if (!num_entries)
return;
new_size = efi.memmap.desc_size * num_entries; new_size = efi.memmap.desc_size * num_entries;
new_phys = efi_memmap_alloc(num_entries); new_phys = efi_memmap_alloc(num_entries);
if (!new_phys) { if (!new_phys) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment