Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Hibernate: Restructure files and functions

This patch has no functional changes, it just to keep the assembler
code to a minimum. Files and functions naming is borrowed from X86.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/9616/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Huacai Chen and committed by
Ralf Baechle
f8fd30eb 2a21dc7c

+13 -5
+1 -1
arch/mips/power/Makefile
··· 1 - obj-$(CONFIG_HIBERNATION) += cpu.o hibernate.o 1 + obj-$(CONFIG_HIBERNATION) += cpu.o hibernate.o hibernate_asm.o
+2 -4
arch/mips/power/hibernate.S arch/mips/power/hibernate_asm.S
··· 29 29 j swsusp_save 30 30 END(swsusp_arch_suspend) 31 31 32 - LEAF(swsusp_arch_resume) 33 - /* Avoid TLB mismatch during and after kernel resume */ 34 - jal local_flush_tlb_all 32 + LEAF(restore_image) 35 33 PTR_L t0, restore_pblist 36 34 0: 37 35 PTR_L t1, PBE_ADDRESS(t0) /* source */ ··· 58 60 PTR_L s7, PT_R23(t0) 59 61 PTR_LI v0, 0x0 60 62 jr ra 61 - END(swsusp_arch_resume) 63 + END(restore_image)
+10
arch/mips/power/hibernate.c
··· 1 + #include <asm/tlbflush.h> 2 + 3 + extern int restore_image(void); 4 + 5 + int swsusp_arch_resume(void) 6 + { 7 + /* Avoid TLB mismatch during and after kernel resume */ 8 + local_flush_tlb_all(); 9 + return restore_image(); 10 + }