aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2007-05-02 19:27:09 +0200
committerAndi Kleen <andi@basil.nowhere.org>2007-05-02 19:27:09 +0200
commit692174b97d5b871f4b0f648b1fb17aa37b955876 (patch)
tree17a91a0549cb5dbd22b7375becd937ee13d193d4 /include/asm-i386
parent[PATCH] i386: VDSO_PRELINK warning fix (diff)
downloadlinux-dev-692174b97d5b871f4b0f648b1fb17aa37b955876.tar.xz
linux-dev-692174b97d5b871f4b0f648b1fb17aa37b955876.zip
[PATCH] i386: Initialize esp0 properly all the time
Whenever we schedule, __switch_to calls load_esp0 which does: tss->esp0 = thread->esp0; This is never initialized for the initial thread (ie "swapper"), so when we're scheduling that, we end up setting esp0 to 0. This is fine: the swapper never leaves ring 0, so this field is never used. lguest, however, gets upset that we're trying to used an unmapped page as our kernel stack. Rather than work around it there, let's initialize it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/asm-i386')
-rw-r--r--include/asm-i386/processor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h
index 11bf899de8aa..01ae0ffcf236 100644
--- a/include/asm-i386/processor.h
+++ b/include/asm-i386/processor.h
@@ -421,6 +421,7 @@ struct thread_struct {
};
#define INIT_THREAD { \
+ .esp0 = sizeof(init_stack) + (long)&init_stack, \
.vm86_info = NULL, \
.sysenter_cs = __KERNEL_CS, \
.io_bitmap_ptr = NULL, \