[PATCH 3.2 022/164] MIPS: Hibernate: flush TLB entries earlier
From: Ben Hutchings <hidden>
Date: 2015-08-02 00:34:18
Also in:
lkml, stable
3.2.70-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Huacai Chen <redacted> commit 2a21dc7c196209d94cb570a0d340faa6c760f7f8 upstream. We found that TLB mismatch not only happens after kernel resume, but also happens during snapshot restore. So move it to the beginning of swsusp_arch_suspend(). Signed-off-by: Huacai Chen <redacted> Cc: Steven J. Hill <redacted> Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang <redacted> Cc: Zhangjin Wu <redacted> Patchwork: https://patchwork.linux-mips.org/patch/9621/ Signed-off-by: Ralf Baechle <redacted> Signed-off-by: Ben Hutchings <redacted> --- arch/mips/power/hibernate.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/mips/power/hibernate.S
+++ b/arch/mips/power/hibernate.S@@ -31,6 +31,8 @@ LEAF(swsusp_arch_suspend) END(swsusp_arch_suspend) LEAF(swsusp_arch_resume) + /* Avoid TLB mismatch during and after kernel resume */ + jal local_flush_tlb_all PTR_L t0, restore_pblist 0: PTR_L t1, PBE_ADDRESS(t0) /* source */
@@ -44,7 +46,6 @@ LEAF(swsusp_arch_resume) bne t1, t3, 1b PTR_L t0, PBE_NEXT(t0) bnez t0, 0b - jal local_flush_tlb_all /* Avoid TLB mismatch after kernel resume */ PTR_LA t0, saved_regs PTR_L ra, PT_R31(t0) PTR_L sp, PT_R29(t0)