From 9ee79a3d372fcb6729893437f4923c5efd1f85db Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Mon, 22 Jan 2007 09:18:31 -0600 Subject: [PATCH] x86: fix PDA variables to work during boot The current PDA code, which went in in post 2.6.19 has a flaw in that it doesn't correctly cycle the GDT and %GS segment through the boot PDA, the CPU PDA and finally the per-cpu PDA. The bug generally doesn't show up if the boot CPU id is zero, but everything falls apart for a non zero boot CPU id. The basically kills voyager which is perfectly capable of doing non zero CPU id boots, so voyager currently won't boot without this. The fix is to be careful and actually do the GDT setups correctly. Signed-off-by: James Bottomley Cc: Andi Kleen Cc: Jeremy Fitzhardinge Cc: Andrew Morton Signed-off-by: Linus Torvalds --- arch/i386/mach-voyager/voyager_smp.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/i386/mach-voyager/voyager_smp.c') diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c index 55428e656a3f..74aeedf277f4 100644 --- a/arch/i386/mach-voyager/voyager_smp.c +++ b/arch/i386/mach-voyager/voyager_smp.c @@ -772,6 +772,12 @@ initialize_secondary(void) set_current(hard_get_current()); #endif + /* + * switch to the per CPU GDT we already set up + * in do_boot_cpu() + */ + cpu_set_gdt(current_thread_info()->cpu); + /* * We don't actually need to load the full TSS, * basically just the stack pointer and the eip. -- cgit v1.2.1