arm64: Use INIT_SCTLR_EL1_MMU_OFF to disable the MMU on CPU restart
authorMarc Zyngier <maz@kernel.org>
Wed, 10 Mar 2021 13:25:57 +0000 (13:25 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 18 Mar 2021 15:51:07 +0000 (15:51 +0000)
Instead of doing a RMW on SCTLR_EL1 to disable the MMU, use the
existing define that loads the right set of bits.

Acked-by: Will Deacon <will@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kernel/cpu-reset.S

index 37721eb..d47ff63 100644 (file)
  * flat identity mapping.
  */
 SYM_CODE_START(__cpu_soft_restart)
-       /* Clear sctlr_el1 flags. */
-       mrs     x12, sctlr_el1
-       mov_q   x13, SCTLR_ELx_FLAGS
-       bic     x12, x12, x13
+       mov_q   x12, INIT_SCTLR_EL1_MMU_OFF
        pre_disable_mmu_workaround
        /*
         * either disable EL1&0 translation regime or disable EL2&0 translation