aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/suspend.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/suspend.c')
-rw-r--r--arch/arm/kernel/suspend.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/arm/kernel/suspend.c b/arch/arm/kernel/suspend.c
index 0a33f109549d..2beda56e4574 100644
--- a/arch/arm/kernel/suspend.c
+++ b/arch/arm/kernel/suspend.c
@@ -24,14 +24,17 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
24 return -EINVAL; 24 return -EINVAL;
25 25
26 /* 26 /*
27 * Temporarily switch the page tables to our suspend page 27 * Provide a temporary page table with an identity mapping for
28 * tables, which contain the temporary identity mapping 28 * the MMU-enable code, required for resuming. On successful
29 * required for resuming. 29 * resume (indicated by a zero return code), we need to switch
30 * back to the correct page tables.
30 */ 31 */
31 cpu_switch_mm(suspend_pgd, mm); 32 ret = __cpu_suspend(virt_to_phys(suspend_pgd),
32 ret = __cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, arg, fn); 33 PHYS_OFFSET - PAGE_OFFSET, arg, fn);
33 cpu_switch_mm(mm->pgd, mm); 34 if (ret == 0) {
34 local_flush_tlb_all(); 35 cpu_switch_mm(mm->pgd, mm);
36 local_flush_tlb_all();
37 }
35 38
36 return ret; 39 return ret;
37} 40}