diff options
Diffstat (limited to 'arch/arm/kernel/suspend.c')
-rw-r--r-- | arch/arm/kernel/suspend.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/arm/kernel/suspend.c b/arch/arm/kernel/suspend.c index 2beda56e4574..0a33f109549d 100644 --- a/arch/arm/kernel/suspend.c +++ b/arch/arm/kernel/suspend.c @@ -24,17 +24,14 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long)) return -EINVAL; /* - * Provide a temporary page table with an identity mapping for - * the MMU-enable code, required for resuming. On successful - * resume (indicated by a zero return code), we need to switch - * back to the correct page tables. + * Temporarily switch the page tables to our suspend page + * tables, which contain the temporary identity mapping + * required for resuming. */ - ret = __cpu_suspend(virt_to_phys(suspend_pgd), - PHYS_OFFSET - PAGE_OFFSET, arg, fn); - if (ret == 0) { - cpu_switch_mm(mm->pgd, mm); - local_flush_tlb_all(); - } + cpu_switch_mm(suspend_pgd, mm); + ret = __cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, arg, fn); + cpu_switch_mm(mm->pgd, mm); + local_flush_tlb_all(); return ret; } |