arm64: head: create a new function for setting the boot_cpu_mode flag
authorMatthew Leach <matthew.leach@arm.com>
Fri, 11 Oct 2013 13:52:16 +0000 (14:52 +0100)
committerMark Brown <broonie@linaro.org>
Wed, 23 Jul 2014 11:54:22 +0000 (12:54 +0100)
commitc4885474b72e7b4034156eb9e6868fa6f471efbf
tree720773c0b4ca18e5d645f889decd83123320585c
parent099776d20c5a1801cdf413fdec34e5ee29b761f3
arm64: head: create a new function for setting the boot_cpu_mode flag

Currently, the code for setting the __cpu_boot_mode flag is munged in
with el2_setup. This makes things difficult on a BE bringup as a
memory access has to have occurred before el2_setup which is the place
that we'd like to set the endianess on the current EL.

Create a new function for setting __cpu_boot_mode and have el2_setup
return the mode the CPU. Also define a new constant in virt.h,
BOOT_CPU_MODE_EL1, for readability.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 828e9834e9a5b7e61046aa3c5f603a4fecba2fb4)
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm64/include/asm/virt.h
arch/arm64/kernel/head.S