diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2008-02-09 17:24:09 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-02-09 17:24:09 -0500 |
commit | c57591244a08bb441c83472f5c110151bb7c2cc6 (patch) | |
tree | adfb539d83e67079e8bb26085b12f9d33f0120ee /arch/x86/power/swsusp.S | |
parent | cf7700fe24301df2c8d3636cf40784651c098207 (diff) |
x86 PM: rename 32-bit files in arch/x86/power
Rename cpu.c, suspend.c and swsusp.S in arch/x86/power to cpu_32.c,
hibernate_32.c and hibernate_asm_32.S, respectively, and update the
purpose and copyright information in these files.
Update the Makefile in arch/x86/power to reflect the above changes.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/power/swsusp.S')
-rw-r--r-- | arch/x86/power/swsusp.S | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/arch/x86/power/swsusp.S b/arch/x86/power/swsusp.S deleted file mode 100644 index 53662e05b393..000000000000 --- a/arch/x86/power/swsusp.S +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | .text | ||
2 | |||
3 | /* Originally gcc generated, modified by hand | ||
4 | * | ||
5 | * This may not use any stack, nor any variable that is not "NoSave": | ||
6 | * | ||
7 | * Its rewriting one kernel image with another. What is stack in "old" | ||
8 | * image could very well be data page in "new" image, and overwriting | ||
9 | * your own stack under you is bad idea. | ||
10 | */ | ||
11 | |||
12 | #include <linux/linkage.h> | ||
13 | #include <asm/segment.h> | ||
14 | #include <asm/page.h> | ||
15 | #include <asm/asm-offsets.h> | ||
16 | |||
17 | .text | ||
18 | |||
19 | ENTRY(swsusp_arch_suspend) | ||
20 | |||
21 | movl %esp, saved_context_esp | ||
22 | movl %ebx, saved_context_ebx | ||
23 | movl %ebp, saved_context_ebp | ||
24 | movl %esi, saved_context_esi | ||
25 | movl %edi, saved_context_edi | ||
26 | pushfl ; popl saved_context_eflags | ||
27 | |||
28 | call swsusp_save | ||
29 | ret | ||
30 | |||
31 | ENTRY(restore_image) | ||
32 | movl resume_pg_dir, %ecx | ||
33 | subl $__PAGE_OFFSET, %ecx | ||
34 | movl %ecx, %cr3 | ||
35 | |||
36 | movl restore_pblist, %edx | ||
37 | .p2align 4,,7 | ||
38 | |||
39 | copy_loop: | ||
40 | testl %edx, %edx | ||
41 | jz done | ||
42 | |||
43 | movl pbe_address(%edx), %esi | ||
44 | movl pbe_orig_address(%edx), %edi | ||
45 | |||
46 | movl $1024, %ecx | ||
47 | rep | ||
48 | movsl | ||
49 | |||
50 | movl pbe_next(%edx), %edx | ||
51 | jmp copy_loop | ||
52 | .p2align 4,,7 | ||
53 | |||
54 | done: | ||
55 | /* go back to the original page tables */ | ||
56 | movl $swapper_pg_dir, %ecx | ||
57 | subl $__PAGE_OFFSET, %ecx | ||
58 | movl %ecx, %cr3 | ||
59 | /* Flush TLB, including "global" things (vmalloc) */ | ||
60 | movl mmu_cr4_features, %eax | ||
61 | movl %eax, %edx | ||
62 | andl $~(1<<7), %edx; # PGE | ||
63 | movl %edx, %cr4; # turn off PGE | ||
64 | movl %cr3, %ecx; # flush TLB | ||
65 | movl %ecx, %cr3 | ||
66 | movl %eax, %cr4; # turn PGE back on | ||
67 | |||
68 | movl saved_context_esp, %esp | ||
69 | movl saved_context_ebp, %ebp | ||
70 | movl saved_context_ebx, %ebx | ||
71 | movl saved_context_esi, %esi | ||
72 | movl saved_context_edi, %edi | ||
73 | |||
74 | pushl saved_context_eflags ; popfl | ||
75 | |||
76 | xorl %eax, %eax | ||
77 | |||
78 | ret | ||