summaryrefslogtreecommitdiff
path: root/arch/arm/kernel/hibernate.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2016-01-11 17:03:54 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2016-02-08 15:48:32 +0000
commit4138323eac0b485316e54ad9ce241bac24ddd175 (patch)
tree1a9cd8c95fe1ad0c5e54abf34f1b2c264401bbc8 /arch/arm/kernel/hibernate.c
parent2841029393fad551b49b6de34d44bfa9ef256441 (diff)
ARM: use virt_to_idmap() for soft_restart()
Code run via soft_restart() is run with the MMU disabled, so we need to pass the identity map physical address rather than the address obtained from virt_to_phys(). Therefore, replace virt_to_phys() with virt_to_idmap() for all callers of soft_restart(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/hibernate.c')
-rw-r--r--arch/arm/kernel/hibernate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/kernel/hibernate.c b/arch/arm/kernel/hibernate.c
index a71501ff6f18..b09561a6d06a 100644
--- a/arch/arm/kernel/hibernate.c
+++ b/arch/arm/kernel/hibernate.c
@@ -62,7 +62,7 @@ static int notrace arch_save_image(unsigned long unused)
ret = swsusp_save();
if (ret == 0)
- _soft_restart(virt_to_phys(cpu_resume), false);
+ _soft_restart(virt_to_idmap(cpu_resume), false);
return ret;
}
@@ -87,7 +87,7 @@ static void notrace arch_restore_image(void *unused)
for (pbe = restore_pblist; pbe; pbe = pbe->next)
copy_page(pbe->orig_address, pbe->address);
- _soft_restart(virt_to_phys(cpu_resume), false);
+ _soft_restart(virt_to_idmap(cpu_resume), false);
}
static u64 resume_stack[PAGE_SIZE/2/sizeof(u64)] __nosavedata;