mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Matt Fleming <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
0d054ad96e
commit
24d45d1dc2
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue