Skip to content

Commit 24d45d1

Browse files
Ard BiesheuvelIngo Molnar
authored andcommitted
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 <ard.biesheuvel@linaro.org> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Borislav Petkov <bp@alien8.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> 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 <mingo@kernel.org>
1 parent 0d054ad commit 24d45d1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/firmware/efi/arm-runtime.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ static int __init arm_enable_runtime_services(void)
105105

106106
mapsize = efi.memmap.map_end - efi.memmap.map;
107107

108-
efi.memmap.map = (__force void *)ioremap_cache(efi.memmap.phys_map,
109-
mapsize);
108+
efi.memmap.map = memremap(efi.memmap.phys_map, mapsize, MEMREMAP_WB);
110109
if (!efi.memmap.map) {
111110
pr_err("Failed to remap EFI memory map\n");
112111
return -ENOMEM;

0 commit comments

Comments
 (0)