From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753267AbcD1KnJ (ORCPT ); Thu, 28 Apr 2016 06:43:09 -0400 Received: from terminus.zytor.com ([198.137.202.10]:48180 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752211AbcD1KnF (ORCPT ); Thu, 28 Apr 2016 06:43:05 -0400 Date: Thu, 28 Apr 2016 03:42:09 -0700 From: tip-bot for Ard Biesheuvel Message-ID: Cc: leif.lindholm@linaro.org, tglx@linutronix.de, ard.biesheuvel@linaro.org, matt@codeblueprint.co.uk, will.deacon@arm.com, hpa@zytor.com, bp@alien8.de, linux-kernel@vger.kernel.org, mingo@kernel.org, peterz@infradead.org Reply-To: bp@alien8.de, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, peterz@infradead.org, matt@codeblueprint.co.uk, ard.biesheuvel@linaro.org, tglx@linutronix.de, leif.lindholm@linaro.org, will.deacon@arm.com In-Reply-To: <1461614832-17633-31-git-send-email-matt@codeblueprint.co.uk> References: <1461614832-17633-31-git-send-email-matt@codeblueprint.co.uk> To: linux-tip-commits@vger.kernel.org Subject: [tip:efi/core] efi/arm-init: Reserve rather than unmap the memory map for ARM as well Git-Commit-ID: 249f7632162980b286f30166436471f8ba81fc1e 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: 249f7632162980b286f30166436471f8ba81fc1e Gitweb: http://git.kernel.org/tip/249f7632162980b286f30166436471f8ba81fc1e Author: Ard Biesheuvel AuthorDate: Mon, 25 Apr 2016 21:07:02 +0100 Committer: Ingo Molnar CommitDate: Thu, 28 Apr 2016 11:34:05 +0200 efi/arm-init: Reserve rather than unmap the memory map for ARM as well Now that ARM has a fully functional memremap() implementation, there is no longer a need to remove the UEFI memory map from the linear mapping in order to be able to create a permanent mapping for it using generic code. So remove the 'IS_ENABLED(CONFIG_ARM)' conditional we added in: 7cc8cbcf82d1 ("efi/arm64: Don't apply MEMBLOCK_NOMAP to UEFI memory map mapping") ... and revert to using memblock_reserve() for both ARM and arm64. Signed-off-by: Ard Biesheuvel Signed-off-by: Matt Fleming Cc: Borislav Petkov Cc: Leif Lindholm Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1461614832-17633-31-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar --- drivers/firmware/efi/arm-init.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c index 7a3318d..ef90f0c 100644 --- a/drivers/firmware/efi/arm-init.c +++ b/drivers/firmware/efi/arm-init.c @@ -244,20 +244,9 @@ void __init efi_init(void) efi_memattr_init(); early_memunmap(efi.memmap.map, params.mmap_size); - if (IS_ENABLED(CONFIG_ARM)) { - /* - * ARM currently does not allow ioremap_cache() to be called on - * memory regions that are covered by struct page. So remove the - * UEFI memory map from the linear mapping. - */ - memblock_mark_nomap(params.mmap & PAGE_MASK, - PAGE_ALIGN(params.mmap_size + - (params.mmap & ~PAGE_MASK))); - } else { - memblock_reserve(params.mmap & PAGE_MASK, - PAGE_ALIGN(params.mmap_size + - (params.mmap & ~PAGE_MASK))); - } + memblock_reserve(params.mmap & PAGE_MASK, + PAGE_ALIGN(params.mmap_size + + (params.mmap & ~PAGE_MASK))); init_screen_info(); }