diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2011-02-04 16:14:11 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2011-02-04 22:27:28 -0800 |
commit | 11d4c3f9b671720e80353dd7e433ff2bf65e9500 (patch) | |
tree | b3560b0642216e9c9e1a54e57a5f55845f063e6b /arch/x86/kernel/acpi/sleep.c | |
parent | f7448548a9f32db38f243ccd4271617758ddfe2c (diff) | |
download | op-kernel-dev-11d4c3f9b671720e80353dd7e433ff2bf65e9500.zip op-kernel-dev-11d4c3f9b671720e80353dd7e433ff2bf65e9500.tar.gz |
x86-32: Make sure the stack is set up before we use it
Since checkin ebba638ae723d8a8fc2f7abce5ec18b688b791d7 we call
verify_cpu even in 32-bit mode. Unfortunately, calling a function
means using the stack, and the stack pointer was not initialized in
the 32-bit setup code! This code initializes the stack pointer, and
simplifies the interface slightly since it is easier to rely on just a
pointer value rather than a descriptor; we need to have different
values for the segment register anyway.
This retains start_stack as a virtual address, even though a physical
address would be more convenient for 32 bits; the 64-bit code wants
the other way around...
Reported-by: Matthieu Castet <castet.matthieu@free.fr>
LKML-Reference: <4D41E86D.8060205@free.fr>
Tested-by: Kees Cook <kees.cook@canonical.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/acpi/sleep.c')
-rw-r--r-- | arch/x86/kernel/acpi/sleep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index 69fd72a..4d9ebba 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c @@ -100,7 +100,7 @@ int acpi_save_state_mem(void) #else /* CONFIG_64BIT */ header->trampoline_segment = setup_trampoline() >> 4; #ifdef CONFIG_SMP - stack_start.sp = temp_stack + sizeof(temp_stack); + stack_start = (unsigned long)temp_stack + sizeof(temp_stack); early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(smp_processor_id()); initial_gs = per_cpu_offset(smp_processor_id()); |