diff options
author | Pavel Machek <pavel@suse.cz> | 2008-04-10 17:28:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:37 -0400 |
commit | e44b7b7525ad9d43163ab5e60c784325419e0ea6 (patch) | |
tree | e2918917a97b4c9de4367e8778ed78afc762b9f8 /arch/x86/boot/video-vesa.c | |
parent | f49688d459c5eaa62db3597cbfd3cb13e361d415 (diff) |
x86: move suspend wakeup code to C
Move wakeup code to .c, so that video mode setting code can be shared
between boot and wakeup. Remove nasty assembly code in 64-bit case by
re-using trampoline code. Stack setup was fixed to clear high 16bits
of %esp, maybe that fixes some machines.
.c code sharing and morse code was done H. Peter Anvin, Sam Ravnborg
reviewed kbuild related stuff, and it seems okay to him. Rafael did
some cleanups.
[rjw:
* Made the patch stop breaking compilation on x86-32
* Added arch/x86/kernel/acpi/sleep.h
* Got rid of compiler warnings in arch/x86/kernel/acpi/sleep.c
* Fixed 32-bit compilation on x86-64 systems
* Added include/asm-x86/trampoline.h and fixed the non-SMP
compilation on 64-bit x86
* Removed arch/x86/kernel/acpi/sleep_32.c which was not used
* Fixed some breakage caused by the integration of smpboot.c done
under us in the meantime]
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/boot/video-vesa.c')
-rw-r--r-- | arch/x86/boot/video-vesa.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/boot/video-vesa.c b/arch/x86/boot/video-vesa.c index 419b5c273374..5d5a3f6e8b5c 100644 --- a/arch/x86/boot/video-vesa.c +++ b/arch/x86/boot/video-vesa.c | |||
@@ -24,7 +24,11 @@ static struct vesa_mode_info vminfo; | |||
24 | 24 | ||
25 | __videocard video_vesa; | 25 | __videocard video_vesa; |
26 | 26 | ||
27 | #ifndef _WAKEUP | ||
27 | static void vesa_store_mode_params_graphics(void); | 28 | static void vesa_store_mode_params_graphics(void); |
29 | #else /* _WAKEUP */ | ||
30 | static inline void vesa_store_mode_params_graphics(void) {} | ||
31 | #endif /* _WAKEUP */ | ||
28 | 32 | ||
29 | static int vesa_probe(void) | 33 | static int vesa_probe(void) |
30 | { | 34 | { |
@@ -165,6 +169,8 @@ static int vesa_set_mode(struct mode_info *mode) | |||
165 | } | 169 | } |
166 | 170 | ||
167 | 171 | ||
172 | #ifndef _WAKEUP | ||
173 | |||
168 | /* Switch DAC to 8-bit mode */ | 174 | /* Switch DAC to 8-bit mode */ |
169 | static void vesa_dac_set_8bits(void) | 175 | static void vesa_dac_set_8bits(void) |
170 | { | 176 | { |
@@ -288,6 +294,8 @@ void vesa_store_edid(void) | |||
288 | #endif /* CONFIG_FIRMWARE_EDID */ | 294 | #endif /* CONFIG_FIRMWARE_EDID */ |
289 | } | 295 | } |
290 | 296 | ||
297 | #endif /* not _WAKEUP */ | ||
298 | |||
291 | __videocard video_vesa = | 299 | __videocard video_vesa = |
292 | { | 300 | { |
293 | .card_name = "VESA", | 301 | .card_name = "VESA", |