forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/arch/x86/power/hibernate_asm_64.S
....@@ -1,7 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Hibernation support for x86-64
3
- *
4
- * Distribute under GPLv2.
54 *
65 * Copyright 2007 Rafael J. Wysocki <rjw@sisk.pl>
76 * Copyright 2005 Andi Kleen <ak@suse.de>
....@@ -23,7 +22,7 @@
2322 #include <asm/processor-flags.h>
2423 #include <asm/frame.h>
2524
26
-ENTRY(swsusp_arch_suspend)
25
+SYM_FUNC_START(swsusp_arch_suspend)
2726 movq $saved_context, %rax
2827 movq %rsp, pt_regs_sp(%rax)
2928 movq %rbp, pt_regs_bp(%rax)
....@@ -50,16 +49,16 @@
5049 FRAME_BEGIN
5150 call swsusp_save
5251 FRAME_END
53
- ret
54
-ENDPROC(swsusp_arch_suspend)
52
+ RET
53
+SYM_FUNC_END(swsusp_arch_suspend)
5554
56
-ENTRY(restore_image)
55
+SYM_CODE_START(restore_image)
5756 /* prepare to jump to the image kernel */
5857 movq restore_jump_address(%rip), %r8
5958 movq restore_cr3(%rip), %r9
6059
6160 /* prepare to switch to temporary page tables */
62
- movq temp_level4_pgt(%rip), %rax
61
+ movq temp_pgt(%rip), %rax
6362 movq mmu_cr4_features(%rip), %rbx
6463
6564 /* prepare to copy image data to their original locations */
....@@ -68,9 +67,10 @@
6867 /* jump to relocated restore code */
6968 movq relocated_restore_code(%rip), %rcx
7069 jmpq *%rcx
70
+SYM_CODE_END(restore_image)
7171
7272 /* code below has been relocated to a safe page */
73
-ENTRY(core_restore_code)
73
+SYM_CODE_START(core_restore_code)
7474 /* switch to temporary page tables */
7575 movq %rax, %cr3
7676 /* flush TLB */
....@@ -98,10 +98,11 @@
9898 .Ldone:
9999 /* jump to the restore_registers address from the image header */
100100 jmpq *%r8
101
+SYM_CODE_END(core_restore_code)
101102
102103 /* code below belongs to the image kernel */
103104 .align PAGE_SIZE
104
-ENTRY(restore_registers)
105
+SYM_FUNC_START(restore_registers)
105106 /* go back to the original page tables */
106107 movq %r9, %cr3
107108
....@@ -142,5 +143,5 @@
142143 /* tell the hibernation core that we've just restored the memory */
143144 movq %rax, in_suspend(%rip)
144145
145
- ret
146
-ENDPROC(restore_registers)
146
+ RET
147
+SYM_FUNC_END(restore_registers)