diff options
author | Geoff Levand <geoff@infradead.org> | 2013-12-17 00:19:29 +0000 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2014-02-26 11:16:28 +0000 |
commit | 09024aa61e1bc994404683e2e5b363484a15dd12 (patch) | |
tree | 8df39e6468b4c3c0140afc87f0a937850bec592d /arch/arm64 | |
parent | ea8c2e1124457f266f82effc3e6558552527943a (diff) | |
download | linux-09024aa61e1bc994404683e2e5b363484a15dd12.tar.gz linux-09024aa61e1bc994404683e2e5b363484a15dd12.tar.bz2 linux-09024aa61e1bc994404683e2e5b363484a15dd12.zip |
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>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/kernel/process.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 1c0a9be2ffa8..fa6b5bba15f6 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -72,8 +72,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(); } /* |