]> git.baikalelectronics.ru Git - kernel.git/commit
x86-32: Make sure the stack is set up before we use it
authorH. Peter Anvin <hpa@linux.intel.com>
Sat, 5 Feb 2011 00:14:11 +0000 (16:14 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Sat, 5 Feb 2011 06:27:28 +0000 (22:27 -0800)
commit2654a8b724d5dc4eb4b21d5876b497516bde74ce
treeb3560b0642216e9c9e1a54e57a5f55845f063e6b
parentaa9172424360cb175fe92b19227818a5b0d9ee58
x86-32: Make sure the stack is set up before we use it

Since checkin d14d5b39250cd041278c7c31ff2b3294b2a6e81c 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>
arch/x86/include/asm/smp.h
arch/x86/kernel/acpi/sleep.c
arch/x86/kernel/head_32.S
arch/x86/kernel/smpboot.c