x86: move suspend wakeup code to C
authorPavel Machek <pavel@suse.cz>
Thu, 10 Apr 2008 21:28:10 +0000 (23:28 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:37 +0000 (17:41 +0200)
commite44b7b7525ad9d43163ab5e60c784325419e0ea6
treee2918917a97b4c9de4367e8778ed78afc762b9f8
parentf49688d459c5eaa62db3597cbfd3cb13e361d415
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>
34 files changed:
arch/x86/Kconfig
arch/x86/boot/Makefile
arch/x86/boot/boot.h
arch/x86/boot/video-bios.c
arch/x86/boot/video-mode.c [new file with mode: 0644]
arch/x86/boot/video-vesa.c
arch/x86/boot/video-vga.c
arch/x86/boot/video.c
arch/x86/kernel/acpi/Makefile
arch/x86/kernel/acpi/realmode/Makefile [new file with mode: 0644]
arch/x86/kernel/acpi/realmode/copy.S [new file with mode: 0644]
arch/x86/kernel/acpi/realmode/video-bios.c [new file with mode: 0644]
arch/x86/kernel/acpi/realmode/video-mode.c [new file with mode: 0644]
arch/x86/kernel/acpi/realmode/video-vesa.c [new file with mode: 0644]
arch/x86/kernel/acpi/realmode/video-vga.c [new file with mode: 0644]
arch/x86/kernel/acpi/realmode/wakemain.c [new file with mode: 0644]
arch/x86/kernel/acpi/realmode/wakeup.S [new file with mode: 0644]
arch/x86/kernel/acpi/realmode/wakeup.h [new file with mode: 0644]
arch/x86/kernel/acpi/realmode/wakeup.lds.S [new file with mode: 0644]
arch/x86/kernel/acpi/sleep.c
arch/x86/kernel/acpi/sleep.h [new file with mode: 0644]
arch/x86/kernel/acpi/sleep_32.c [deleted file]
arch/x86/kernel/acpi/wakeup_32.S
arch/x86/kernel/acpi/wakeup_64.S
arch/x86/kernel/acpi/wakeup_rm.S [new file with mode: 0644]
arch/x86/kernel/e820_64.c
arch/x86/kernel/head_64.S
arch/x86/kernel/setup_32.c
arch/x86/kernel/setup_64.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/trampoline_64.S
arch/x86/mach-voyager/voyager_smp.c
include/asm-x86/smp.h
include/asm-x86/trampoline.h [new file with mode: 0644]