linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] efi: don't issue error message when booted under xen
@ 2017-05-08 12:56 Juergen Gross
       [not found] ` <20170508125633.1762-1-jgross-IBi9RG/b67k@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Gross @ 2017-05-08 12:56 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-efi-u79uwXL29TY76Z2rM5mHXA, x86-DgEjT+Ai2ygdnm+yROfE0A
  Cc: hpa-YMNOUZJC4hwAvxtiuMwx3w, mingo-H+wXaHxf7aLQT0dZR+AlfA,
	tglx-hfZtesqFncYOwBW4kG4KsQ,
	ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A,
	matt-mF/unelCI9GS6iBeEJttW/XRex20P6io, Juergen Gross

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: Juergen Gross <jgross-IBi9RG/b67k@public.gmane.org>
---
 arch/x86/platform/efi/quirks.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
index 26615991d69c..e0cf95a83f3f 100644
--- a/arch/x86/platform/efi/quirks.c
+++ b/arch/x86/platform/efi/quirks.c
@@ -360,6 +360,9 @@ void __init efi_free_boot_services(void)
 		free_bootmem_late(start, size);
 	}
 
+	if (!num_entries)
+		return;
+
 	new_size = efi.memmap.desc_size * num_entries;
 	new_phys = efi_memmap_alloc(num_entries);
 	if (!new_phys) {
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] efi: don't issue error message when booted under xen
       [not found] ` <20170508125633.1762-1-jgross-IBi9RG/b67k@public.gmane.org>
@ 2017-05-15 12:52   ` Matt Fleming
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Fleming @ 2017-05-15 12:52 UTC (permalink / raw)
  To: Juergen Gross
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-efi-u79uwXL29TY76Z2rM5mHXA, x86-DgEjT+Ai2ygdnm+yROfE0A,
	hpa-YMNOUZJC4hwAvxtiuMwx3w, mingo-H+wXaHxf7aLQT0dZR+AlfA,
	tglx-hfZtesqFncYOwBW4kG4KsQ,
	ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A

On Mon, 08 May, at 02:56:33PM, Juergen Gross wrote:
> 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: Juergen Gross <jgross-IBi9RG/b67k@public.gmane.org>
> ---
>  arch/x86/platform/efi/quirks.c | 3 +++
>  1 file changed, 3 insertions(+)

Thanks. I've applied this for the urgent branch because it's trivial
and we've had issues before where these kinds of error messages mess
up an otherwise clean boot screen.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-15 12:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-08 12:56 [PATCH] efi: don't issue error message when booted under xen Juergen Gross
     [not found] ` <20170508125633.1762-1-jgross-IBi9RG/b67k@public.gmane.org>
2017-05-15 12:52   ` Matt Fleming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).