aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-07-29 16:12:54 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-07-29 16:12:54 -0400
commite148d0f85cc3e9f2802c7fcf451098c6d19b535b (patch)
tree974d3f0f598eabaa5623ffdab19de1459a8edb43
parent6453dbdda30428a3c56568c96fe70ea3612f07e2 (diff)
parent4ce827b4cc58bec7952591b96cce2b28553e4d5b (diff)
Merge branch 'pm-sleep'
* pm-sleep: x86/power/64: Fix hibernation return address corruption
-rw-r--r--arch/x86/power/hibernate_asm_64.S4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/power/hibernate_asm_64.S b/arch/x86/power/hibernate_asm_64.S
index 3177c2bc26f6..8eee0e9c93f0 100644
--- a/arch/x86/power/hibernate_asm_64.S
+++ b/arch/x86/power/hibernate_asm_64.S
@@ -24,7 +24,6 @@
24#include <asm/frame.h> 24#include <asm/frame.h>
25 25
26ENTRY(swsusp_arch_suspend) 26ENTRY(swsusp_arch_suspend)
27 FRAME_BEGIN
28 movq $saved_context, %rax 27 movq $saved_context, %rax
29 movq %rsp, pt_regs_sp(%rax) 28 movq %rsp, pt_regs_sp(%rax)
30 movq %rbp, pt_regs_bp(%rax) 29 movq %rbp, pt_regs_bp(%rax)
@@ -48,6 +47,7 @@ ENTRY(swsusp_arch_suspend)
48 movq %cr3, %rax 47 movq %cr3, %rax
49 movq %rax, restore_cr3(%rip) 48 movq %rax, restore_cr3(%rip)
50 49
50 FRAME_BEGIN
51 call swsusp_save 51 call swsusp_save
52 FRAME_END 52 FRAME_END
53 ret 53 ret
@@ -104,7 +104,6 @@ ENTRY(core_restore_code)
104 /* code below belongs to the image kernel */ 104 /* code below belongs to the image kernel */
105 .align PAGE_SIZE 105 .align PAGE_SIZE
106ENTRY(restore_registers) 106ENTRY(restore_registers)
107 FRAME_BEGIN
108 /* go back to the original page tables */ 107 /* go back to the original page tables */
109 movq %r9, %cr3 108 movq %r9, %cr3
110 109
@@ -145,6 +144,5 @@ ENTRY(restore_registers)
145 /* tell the hibernation core that we've just restored the memory */ 144 /* tell the hibernation core that we've just restored the memory */
146 movq %rax, in_suspend(%rip) 145 movq %rax, in_suspend(%rip)
147 146
148 FRAME_END
149 ret 147 ret
150ENDPROC(restore_registers) 148ENDPROC(restore_registers)