diff options
Diffstat (limited to 'arch/arm64/kernel/efi.c')
-rw-r--r-- | arch/arm64/kernel/efi.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index de46b50f4cdf..fc5508e0df57 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c | |||
@@ -224,6 +224,8 @@ static bool __init efi_virtmap_init(void) | |||
224 | { | 224 | { |
225 | efi_memory_desc_t *md; | 225 | efi_memory_desc_t *md; |
226 | 226 | ||
227 | init_new_context(NULL, &efi_mm); | ||
228 | |||
227 | for_each_efi_memory_desc(&memmap, md) { | 229 | for_each_efi_memory_desc(&memmap, md) { |
228 | u64 paddr, npages, size; | 230 | u64 paddr, npages, size; |
229 | pgprot_t prot; | 231 | pgprot_t prot; |
@@ -254,7 +256,8 @@ static bool __init efi_virtmap_init(void) | |||
254 | else | 256 | else |
255 | prot = PAGE_KERNEL; | 257 | prot = PAGE_KERNEL; |
256 | 258 | ||
257 | create_pgd_mapping(&efi_mm, paddr, md->virt_addr, size, prot); | 259 | create_pgd_mapping(&efi_mm, paddr, md->virt_addr, size, |
260 | __pgprot(pgprot_val(prot) | PTE_NG)); | ||
258 | } | 261 | } |
259 | return true; | 262 | return true; |
260 | } | 263 | } |
@@ -329,14 +332,7 @@ core_initcall(arm64_dmi_init); | |||
329 | 332 | ||
330 | static void efi_set_pgd(struct mm_struct *mm) | 333 | static void efi_set_pgd(struct mm_struct *mm) |
331 | { | 334 | { |
332 | if (mm == &init_mm) | 335 | switch_mm(NULL, mm, NULL); |
333 | cpu_set_reserved_ttbr0(); | ||
334 | else | ||
335 | cpu_switch_mm(mm->pgd, mm); | ||
336 | |||
337 | local_flush_tlb_all(); | ||
338 | if (icache_is_aivivt()) | ||
339 | __local_flush_icache_all(); | ||
340 | } | 336 | } |
341 | 337 | ||
342 | void efi_virtmap_load(void) | 338 | void efi_virtmap_load(void) |