diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-04-02 09:31:10 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-04-02 09:31:10 +0200 |
commit | f4d5b8adf3668a2fb69a411974057ec3b150b747 (patch) | |
tree | f98dcd2b5e955edbeb2f2ca19390bbda0eb06077 /drivers/firmware | |
parent | c05c2ec96bb8b7310da1055c7b9d786a3ec6dc0c (diff) | |
parent | 7cc8cbcf82d165dd658d89a7a287140948e76413 (diff) | |
download | talos-obmc-linux-f4d5b8adf3668a2fb69a411974057ec3b150b747.tar.gz talos-obmc-linux-f4d5b8adf3668a2fb69a411974057ec3b150b747.zip |
Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into efi/urgent
Pull EFI/arm64 fix from Matt Fleming:
" * Fix a boot crash on arm64 caused by a recent commit to mark the EFI
memory map as 'MEMBLOCK_NOMAP' which causes the regions to be
omitted from the kernel direct mapping - Ard Biesheuvel "
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/efi/arm-init.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c index aa1f743152a2..8714f8c271ba 100644 --- a/drivers/firmware/efi/arm-init.c +++ b/drivers/firmware/efi/arm-init.c @@ -203,7 +203,19 @@ void __init efi_init(void) reserve_regions(); early_memunmap(memmap.map, params.mmap_size); - memblock_mark_nomap(params.mmap & PAGE_MASK, - PAGE_ALIGN(params.mmap_size + - (params.mmap & ~PAGE_MASK))); + + 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))); + } } |