aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/setup.c
diff options
context:
space:
mode:
authorAshok Raj <ashok.raj@intel.com>2006-03-25 16:29:28 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 09:10:53 -0800
commit51f62e186b78f8743246a349b09be370c8735479 (patch)
treee8b4f95445a581c3844beafb45654cefff5c490d /arch/x86_64/kernel/setup.c
parent[PATCH] x86_64: save FPU context slightly later (diff)
downloadlinux-dev-51f62e186b78f8743246a349b09be370c8735479.tar.xz
linux-dev-51f62e186b78f8743246a349b09be370c8735479.zip
[PATCH] x86_64: cleanup allocating logical cpu numbers in x86_64
Minor cleanup to lend better for physical CPU hotplug. Earlier way of using num_processors as index doesnt fit if CPUs come and go. This makes the code little bit better to read, and helps physical hotplug use the same functions as boot. Reserving CPU0 for BSP is too late to be done in smp_prepare_boot_cpu(). Since logical assignments from MADT is already done via setup_arch()->acpi_boot_init()->parse lapic Signed-off-by: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to '')
-rw-r--r--arch/x86_64/kernel/setup.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index f227d0c23dc6..50cd2bbd75af 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -708,6 +708,12 @@ void __init setup_arch(char **cmdline_p)
check_ioapic();
+ /*
+ * set this early, so we dont allocate cpu0
+ * if MADT list doesnt list BSP first
+ * mpparse.c/MP_processor_info() allocates logical cpu numbers.
+ */
+ cpu_set(0, cpu_present_map);
#ifdef CONFIG_ACPI
/*
* Read APIC and some other early information from ACPI tables.