Skip to content

Commit a843d00

Browse files
chenhuacairalfbaechle
authored andcommitted
MIPS: Hibernate: flush TLB entries earlier
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 <[email protected]> Cc: <[email protected]> Cc: Steven J. Hill <[email protected]> Cc: [email protected] Cc: Fuxin Zhang <[email protected]> Cc: Zhangjin Wu <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/9621/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent 90db024 commit a843d00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/mips/power/hibernate.S

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ LEAF(swsusp_arch_suspend)
3030
END(swsusp_arch_suspend)
3131

3232
LEAF(swsusp_arch_resume)
33+
/* Avoid TLB mismatch during and after kernel resume */
34+
jal local_flush_tlb_all
3335
PTR_L t0, restore_pblist
3436
0:
3537
PTR_L t1, PBE_ADDRESS(t0) /* source */
@@ -43,7 +45,6 @@ LEAF(swsusp_arch_resume)
4345
bne t1, t3, 1b
4446
PTR_L t0, PBE_NEXT(t0)
4547
bnez t0, 0b
46-
jal local_flush_tlb_all /* Avoid TLB mismatch after kernel resume */
4748
PTR_LA t0, saved_regs
4849
PTR_L ra, PT_R31(t0)
4950
PTR_L sp, PT_R29(t0)

0 commit comments

Comments
 (0)