Hi, Ralf, Maybe it is better to have two patches: the first fix the bug, and the second restructure files and functions? Huacai On Fri, Dec 19, 2014 at 11:02 PM, Ralf Baechle <ralf@xxxxxxxxxxxxxx> wrote: > On Fri, Dec 19, 2014 at 10:26:24PM +0800, Huacai Chen wrote: > >> 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(). >> >> Cc: <stable@xxxxxxxxxxxxxxx> >> Signed-off-by: Huacai Chen <chenhc@xxxxxxxxxx> >> --- >> arch/mips/power/hibernate.S | 3 ++- >> 1 files changed, 2 insertions(+), 1 deletions(-) >> >> diff --git a/arch/mips/power/hibernate.S b/arch/mips/power/hibernate.S >> index 32a7c82..e7567c8 100644 >> --- a/arch/mips/power/hibernate.S >> +++ b/arch/mips/power/hibernate.S >> @@ -30,6 +30,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 > > I'd like to keep the assembler code to a minimum. Can you rename > swsusp_arch_resume and create a new wrapper function in C named > swsusp_arch_resume() which calls the old swsusp_arch_resume() after > calling local_flush_tlb_all(), something like that? > > Thanks, > > Ralf >