aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/power/swsusp.S
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2006-12-06 23:34:29 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:28 -0500
commit2d4a34c9365c6e3f94a5b26ce296e1fce9b66c8b (patch)
treead8303f7db40d963f7a7b120996d4fe658a43cce /arch/i386/power/swsusp.S
parentff39593ad0ff7a79a3717edac6634407aa8200c2 (diff)
[PATCH] swsusp: Support i386 systems with PAE or without PSE
Make swsusp support i386 systems with PAE or without PSE. This is done by creating temporary page tables located in resume-safe page frames before the suspend image is restored in the same way as x86_64 does it. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Andi Kleen <ak@suse.de> Cc: Dave Jones <davej@redhat.com> Cc: Nigel Cunningham <ncunningham@linuxmail.org> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/power/swsusp.S')
-rw-r--r--arch/i386/power/swsusp.S9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/i386/power/swsusp.S b/arch/i386/power/swsusp.S
index 8a2b50a0aaad..53662e05b393 100644
--- a/arch/i386/power/swsusp.S
+++ b/arch/i386/power/swsusp.S
@@ -28,8 +28,9 @@ ENTRY(swsusp_arch_suspend)
28 call swsusp_save 28 call swsusp_save
29 ret 29 ret
30 30
31ENTRY(swsusp_arch_resume) 31ENTRY(restore_image)
32 movl $swsusp_pg_dir-__PAGE_OFFSET, %ecx 32 movl resume_pg_dir, %ecx
33 subl $__PAGE_OFFSET, %ecx
33 movl %ecx, %cr3 34 movl %ecx, %cr3
34 35
35 movl restore_pblist, %edx 36 movl restore_pblist, %edx
@@ -51,6 +52,10 @@ copy_loop:
51 .p2align 4,,7 52 .p2align 4,,7
52 53
53done: 54done:
55 /* go back to the original page tables */
56 movl $swapper_pg_dir, %ecx
57 subl $__PAGE_OFFSET, %ecx
58 movl %ecx, %cr3
54 /* Flush TLB, including "global" things (vmalloc) */ 59 /* Flush TLB, including "global" things (vmalloc) */
55 movl mmu_cr4_features, %eax 60 movl mmu_cr4_features, %eax
56 movl %eax, %edx 61 movl %eax, %edx