mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 03:43:03 +00:00
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> Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Git-commit: 09024aa61e1bc994404683e2e5b363484a15dd12 Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
This commit is contained in:
parent
76f2584b1f
commit
17321e6dd1
|
@ -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();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue