arm64: move !VHE work to end of el2_setup
authorMark Rutland <mark.rutland@arm.com>
Wed, 15 Feb 2017 14:54:17 +0000 (14:54 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 22 Mar 2017 17:21:38 +0000 (17:21 +0000)
commitd61c97a7773d0848b4bf5c4697855c7ce117362c
treef256b3718db37b886b7094b483067a5bb59c69c6
parent3ad47d055aa88d9f4189253f5b5c485f4c4626b2
arm64: move !VHE work to end of el2_setup

We only need to initialise sctlr_el1 if we're installing an EL2 stub, so
we may as well defer this until we're doing so. Similarly, we can defer
intialising CPTR_EL2 until then, as we do not access any trapped
functionality as part of el2_setup.

This patch modified el2_setup accordingly, allowing us to remove a
branch and simplify the code flow.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/head.S