aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/suspend_asm.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/kernel/suspend_asm.S')
-rw-r--r--arch/x86_64/kernel/suspend_asm.S17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/x86_64/kernel/suspend_asm.S b/arch/x86_64/kernel/suspend_asm.S
index 4d659e97df10..320b6fb00cca 100644
--- a/arch/x86_64/kernel/suspend_asm.S
+++ b/arch/x86_64/kernel/suspend_asm.S
@@ -39,12 +39,13 @@ ENTRY(swsusp_arch_suspend)
39 call swsusp_save 39 call swsusp_save
40 ret 40 ret
41 41
42ENTRY(swsusp_arch_resume) 42ENTRY(restore_image)
43 /* set up cr3 */ 43 /* switch to temporary page tables */
44 leaq init_level4_pgt(%rip),%rax 44 movq $__PAGE_OFFSET, %rdx
45 subq $__START_KERNEL_map,%rax 45 movq temp_level4_pgt(%rip), %rax
46 movq %rax,%cr3 46 subq %rdx, %rax
47 47 movq %rax, %cr3
48 /* Flush TLB */
48 movq mmu_cr4_features(%rip), %rax 49 movq mmu_cr4_features(%rip), %rax
49 movq %rax, %rdx 50 movq %rax, %rdx
50 andq $~(1<<7), %rdx # PGE 51 andq $~(1<<7), %rdx # PGE
@@ -69,6 +70,10 @@ loop:
69 movq pbe_next(%rdx), %rdx 70 movq pbe_next(%rdx), %rdx
70 jmp loop 71 jmp loop
71done: 72done:
73 /* go back to the original page tables */
74 leaq init_level4_pgt(%rip), %rax
75 subq $__START_KERNEL_map, %rax
76 movq %rax, %cr3
72 /* Flush TLB, including "global" things (vmalloc) */ 77 /* Flush TLB, including "global" things (vmalloc) */
73 movq mmu_cr4_features(%rip), %rax 78 movq mmu_cr4_features(%rip), %rax
74 movq %rax, %rdx 79 movq %rax, %rdx