diff options
author | Huacai Chen <chenhc@lemote.com> | 2015-03-28 22:54:06 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-04-01 11:22:09 -0400 |
commit | f8fd30ebdb36f2598f382a6e57fa010477ad094f (patch) | |
tree | 067259307e93de5b21dbdaf17bdbd8db74eebf28 | |
parent | 2a21dc7c196209d94cb570a0d340faa6c760f7f8 (diff) |
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>
-rw-r--r-- | arch/mips/power/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/power/hibernate.c | 10 | ||||
-rw-r--r-- | arch/mips/power/hibernate_asm.S (renamed from arch/mips/power/hibernate.S) | 6 |
3 files changed, 13 insertions, 5 deletions
diff --git a/arch/mips/power/Makefile b/arch/mips/power/Makefile index 73d56b87cb9b..70bd7883bc1b 100644 --- a/arch/mips/power/Makefile +++ b/arch/mips/power/Makefile | |||
@@ -1 +1 @@ | |||
obj-$(CONFIG_HIBERNATION) += cpu.o hibernate.o | obj-$(CONFIG_HIBERNATION) += cpu.o hibernate.o hibernate_asm.o | ||
diff --git a/arch/mips/power/hibernate.c b/arch/mips/power/hibernate.c new file mode 100644 index 000000000000..19a9af68bcdb --- /dev/null +++ b/arch/mips/power/hibernate.c | |||
@@ -0,0 +1,10 @@ | |||
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 | } | ||
diff --git a/arch/mips/power/hibernate.S b/arch/mips/power/hibernate_asm.S index e7567c8a9e79..b1fab951100f 100644 --- a/arch/mips/power/hibernate.S +++ b/arch/mips/power/hibernate_asm.S | |||
@@ -29,9 +29,7 @@ LEAF(swsusp_arch_suspend) | |||
29 | j swsusp_save | 29 | j swsusp_save |
30 | END(swsusp_arch_suspend) | 30 | END(swsusp_arch_suspend) |
31 | 31 | ||
32 | LEAF(swsusp_arch_resume) | 32 | LEAF(restore_image) |
33 | /* Avoid TLB mismatch during and after kernel resume */ | ||
34 | jal local_flush_tlb_all | ||
35 | PTR_L t0, restore_pblist | 33 | PTR_L t0, restore_pblist |
36 | 0: | 34 | 0: |
37 | PTR_L t1, PBE_ADDRESS(t0) /* source */ | 35 | PTR_L t1, PBE_ADDRESS(t0) /* source */ |
@@ -60,4 +58,4 @@ LEAF(swsusp_arch_resume) | |||
60 | PTR_L s7, PT_R23(t0) | 58 | PTR_L s7, PT_R23(t0) |
61 | PTR_LI v0, 0x0 | 59 | PTR_LI v0, 0x0 |
62 | jr ra | 60 | jr ra |
63 | END(swsusp_arch_resume) | 61 | END(restore_image) |