summaryrefslogtreecommitdiff
path: root/arch/arc/mm
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@kernel.org>2019-09-14 01:20:01 +0300
committerVineet Gupta <vgupta@kernel.org>2021-08-25 00:25:48 +0300
commit89d0d42412a116563c28c763d9c1bdee83b5b6af (patch)
treeb83d63611782632c2002ae30357cab5eb0343f7d /arch/arc/mm
parentbe43b096ed787bad9e1a74f79486159c6cd6e648 (diff)
downloadlinux-89d0d42412a116563c28c763d9c1bdee83b5b6af.tar.xz
ARC: mm: move MMU specific bits out of ASID allocator
And while at it, rewrite commentary on ASID allocator Signed-off-by: Vineet Gupta <vgupta@kernel.org>
Diffstat (limited to 'arch/arc/mm')
-rw-r--r--arch/arc/mm/tlb.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/arc/mm/tlb.c b/arch/arc/mm/tlb.c
index 15cbc285b0de..b68d5798327b 100644
--- a/arch/arc/mm/tlb.c
+++ b/arch/arc/mm/tlb.c
@@ -716,14 +716,11 @@ void arc_mmu_init(void)
if (IS_ENABLED(CONFIG_ARC_HAS_PAE40) && !mmu->pae)
panic("Hardware doesn't support PAE40\n");
- /* Enable the MMU */
- write_aux_reg(ARC_REG_PID, MMU_ENABLE);
+ /* Enable the MMU with ASID 0 */
+ mmu_setup_asid(NULL, 0);
- /* In arc700/smp needed for re-entrant interrupt handling */
-#ifdef CONFIG_ISA_ARCV2
- /* swapper_pg_dir is the pgd for the kernel, used by vmalloc */
- write_aux_reg(ARC_REG_SCRATCH_DATA0, swapper_pg_dir);
-#endif
+ /* cache the pgd pointer in MMU SCRATCH reg (ARCv2 only) */
+ mmu_setup_pgd(NULL, swapper_pg_dir);
if (pae40_exist_but_not_enab())
write_aux_reg(ARC_REG_TLBPD1HI, 0);