Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752448AbcD1KeX (ORCPT ); Thu, 28 Apr 2016 06:34:23 -0400 Received: from terminus.zytor.com ([198.137.202.10]:47456 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751910AbcD1KeT (ORCPT ); Thu, 28 Apr 2016 06:34:19 -0400 Date: Thu, 28 Apr 2016 03:33:32 -0700 From: tip-bot for Ard Biesheuvel Message-ID: Cc: matt@codeblueprint.co.uk, mingo@kernel.org, ard.biesheuvel@linaro.org, peterz@infradead.org, tglx@linutronix.de, bp@alien8.de, linux-kernel@vger.kernel.org, hpa@zytor.com Reply-To: hpa@zytor.com, linux-kernel@vger.kernel.org, bp@alien8.de, ard.biesheuvel@linaro.org, mingo@kernel.org, matt@codeblueprint.co.uk, tglx@linutronix.de, peterz@infradead.org In-Reply-To: <1461614832-17633-10-git-send-email-matt@codeblueprint.co.uk> References: <1461614832-17633-10-git-send-email-matt@codeblueprint.co.uk> To: linux-tip-commits@vger.kernel.org Subject: [tip:efi/core] efi/arm*: Use memremap() to create the persistent memmap mapping Git-Commit-ID: 24d45d1dc275b818093fe1d0055a230ce5e8c4c7 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 Content-Length: 1791 Lines: 41 Commit-ID: 24d45d1dc275b818093fe1d0055a230ce5e8c4c7 Gitweb: http://git.kernel.org/tip/24d45d1dc275b818093fe1d0055a230ce5e8c4c7 Author: Ard Biesheuvel AuthorDate: Mon, 25 Apr 2016 21:06:41 +0100 Committer: Ingo Molnar CommitDate: Thu, 28 Apr 2016 11:33:52 +0200 efi/arm*: Use memremap() to create the persistent memmap mapping Instead of using ioremap_cache(), which is slightly inappropriate for mapping firmware tables, and is not even allowed on ARM for mapping regions that are covered by a struct page, use memremap(), which was invented for this purpose, and will also reuse the existing kernel direct mapping if the requested region is covered by it. Signed-off-by: Ard Biesheuvel Signed-off-by: Matt Fleming Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1461614832-17633-10-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar --- drivers/firmware/efi/arm-runtime.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c index 55a9ea0..19283de 100644 --- a/drivers/firmware/efi/arm-runtime.c +++ b/drivers/firmware/efi/arm-runtime.c @@ -105,8 +105,7 @@ static int __init arm_enable_runtime_services(void) mapsize = efi.memmap.map_end - efi.memmap.map; - efi.memmap.map = (__force void *)ioremap_cache(efi.memmap.phys_map, - mapsize); + efi.memmap.map = memremap(efi.memmap.phys_map, mapsize, MEMREMAP_WB); if (!efi.memmap.map) { pr_err("Failed to remap EFI memory map\n"); return -ENOMEM;