summaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm/mmu.c
diff options
context:
space:
mode:
authorMark Rutland2016-01-25 12:44:58 +0100
committerCatalin Marinas2016-02-16 16:10:44 +0100
commit9e8e865bbe294a69666a1996bda3e87825b258c0 (patch)
tree7db1b6aab086829a70608ca1895c2b66fb5697e4 /arch/arm64/mm/mmu.c
parentarm64: mm: place empty_zero_page in bss (diff)
downloadkernel-qcow2-linux-9e8e865bbe294a69666a1996bda3e87825b258c0.tar.gz
kernel-qcow2-linux-9e8e865bbe294a69666a1996bda3e87825b258c0.tar.xz
kernel-qcow2-linux-9e8e865bbe294a69666a1996bda3e87825b258c0.zip
arm64: unify idmap removal
We currently open-code the removal of the idmap and restoration of the current task's MMU state in a few places. Before introducing yet more copies of this sequence, unify these to call a new helper, cpu_uninstall_idmap. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Jeremy Linton <jeremy.linton@arm.com> Cc: Laura Abbott <labbott@fedoraproject.org> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/mm/mmu.c')
-rw-r--r--arch/arm64/mm/mmu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index cdbf055a325d..e85a719f9f1f 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -468,9 +468,7 @@ void __init paging_init(void)
* TTBR0 is only used for the identity mapping at this stage. Make it
* point to zero page to avoid speculatively fetching new entries.
*/
- cpu_set_reserved_ttbr0();
- local_flush_tlb_all();
- cpu_set_default_tcr_t0sz();
+ cpu_uninstall_idmap();
}
/*