]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] i386: Initialize esp0 properly all the time
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 2 May 2007 17:27:09 +0000 (19:27 +0200)
committerAndi Kleen <andi@basil.nowhere.org>
Wed, 2 May 2007 17:27:09 +0000 (19:27 +0200)
commit692174b97d5b871f4b0f648b1fb17aa37b955876
tree17a91a0549cb5dbd22b7375becd937ee13d193d4
parent1b523fb54977c9bb81b16c4badce581a2b455994
[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>
include/asm-i386/processor.h