From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751126AbdE1Jtj (ORCPT ); Sun, 28 May 2017 05:49:39 -0400 Received: from terminus.zytor.com ([65.50.211.136]:51739 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbdE1Jth (ORCPT ); Sun, 28 May 2017 05:49:37 -0400 Date: Sun, 28 May 2017 02:44:17 -0700 From: tip-bot for Juergen Gross Message-ID: Cc: matt@codeblueprint.co.uk, linux-kernel@vger.kernel.org, ard.biesheuvel@linaro.org, tglx@linutronix.de, jgross@suse.com, mingo@kernel.org, torvalds@linux-foundation.org, hpa@zytor.com, peterz@infradead.org Reply-To: matt@codeblueprint.co.uk, linux-kernel@vger.kernel.org, ard.biesheuvel@linaro.org, tglx@linutronix.de, jgross@suse.com, mingo@kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, hpa@zytor.com In-Reply-To: <20170526113652.21339-2-matt@codeblueprint.co.uk> References: <20170526113652.21339-2-matt@codeblueprint.co.uk> To: linux-tip-commits@vger.kernel.org Subject: [tip:efi/urgent] efi: Don't issue error message when booted under Xen Git-Commit-ID: 1ea34adb87c969b89dfd83f1905a79161e9ada26 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 1ea34adb87c969b89dfd83f1905a79161e9ada26 Gitweb: http://git.kernel.org/tip/1ea34adb87c969b89dfd83f1905a79161e9ada26 Author: Juergen Gross AuthorDate: Fri, 26 May 2017 12:36:47 +0100 Committer: Ingo Molnar CommitDate: Sun, 28 May 2017 11:06:16 +0200 efi: Don't issue error message when booted under Xen 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 Signed-off-by: Matt Fleming Cc: # v4.9+ Cc: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170526113652.21339-2-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar --- 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 2661599..e0cf95a 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) {