aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/process.c
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2013-12-17 00:19:29 +0000
committerMark Brown <broonie@linaro.org>2014-05-21 18:41:19 +0100
commit4a64e4b612733d71f7d86ff9e60fd095e46d2e96 (patch)
tree4905fa9aeb7a6b4646cc9c840fb029433f54226e /arch/arm64/kernel/process.c
parent25bf912c54b9085d3a856af9b0f7c0316b947f61 (diff)
arm64: Fix the soft_restart routine
Change the soft_restart() routine to call cpu_reset() at its identity mapped physical address. The cpu_reset() routine must be called at its identity mapped physical address so that when the MMU is turned off the instruction pointer will be at the correct location in physical memory. Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> (cherry picked from commit 09024aa61e1bc994404683e2e5b363484a15dd12) Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'arch/arm64/kernel/process.c')
-rw-r--r--arch/arm64/kernel/process.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 02a41bba165d..75af46648f26 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -71,8 +71,17 @@ static void setup_restart(void)
void soft_restart(unsigned long addr)
{
+ typedef void (*phys_reset_t)(unsigned long);
+ phys_reset_t phys_reset;
+
setup_restart();
- cpu_reset(addr);
+
+ /* Switch to the identity mapping */
+ phys_reset = (phys_reset_t)virt_to_phys(cpu_reset);
+ phys_reset(addr);
+
+ /* Should never get here */
+ BUG();
}
/*