]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: generalize boot_cpu_id
authorIngo Molnar <mingo@elte.hu>
Tue, 27 Jan 2009 16:13:05 +0000 (17:13 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 29 Jan 2009 13:17:01 +0000 (14:17 +0100)
x86/Voyager can boot on non-zero processors. While that can probably
be fixed by properly remapping the physical CPU IDs, keep boot_cpu_id
for now for easier transition - and expand it to all of x86.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/Kconfig
arch/x86/include/asm/cpu.h
arch/x86/kernel/setup.c
arch/x86/kernel/smpboot.c

index 3671506fb8df34ed859e132846459f7df6be82d9..f4dd851384dbddb36f945634fc15b2e5793ae6c7 100644 (file)
@@ -238,10 +238,6 @@ config SMP
 
          If you don't know what to do here, say N.
 
-config X86_HAS_BOOT_CPU_ID
-       def_bool y
-       depends on X86_VOYAGER
-
 config SPARSE_IRQ
        bool "Support sparse irq numbering"
        depends on PCI_MSI || HT_IRQ
index f03b23e328645e319118d5ed06729b2a7e34887c..b185091bf19ce39f67a325ecd6aafb7c13f8cd23 100644 (file)
@@ -32,10 +32,6 @@ extern void arch_unregister_cpu(int);
 
 DECLARE_PER_CPU(int, cpu_state);
 
-#ifdef CONFIG_X86_HAS_BOOT_CPU_ID
-extern unsigned char boot_cpu_id;
-#else
-#define boot_cpu_id                            0
-#endif
+extern unsigned int boot_cpu_id;
 
 #endif /* _ASM_X86_CPU_H */
index eeb180b1d7aaae0da5af6b448896312bb8f0431f..609e5af60282c3dc14327e89f8c8ac8744d385a1 100644 (file)
 #define ARCH_SETUP
 #endif
 
+unsigned int boot_cpu_id __read_mostly;
+
+#ifdef CONFIG_X86_64
+int default_cpu_present_to_apicid(int mps_cpu)
+{
+       return __default_cpu_present_to_apicid(mps_cpu);
+}
+
+int default_check_phys_apicid_present(int boot_cpu_physical_apicid)
+{
+       return __default_check_phys_apicid_present(boot_cpu_physical_apicid);
+}
+#endif
+
 #ifndef CONFIG_DEBUG_BOOT_PARAMS
 struct boot_params __initdata boot_params;
 #else
index e90b3e50b54fc9e7447b94448957708d2c93ecb1..bc7e220ba0b4990aa70fdeabbdeef0dff4360ffd 100644 (file)
@@ -905,18 +905,6 @@ do_rest:
        return boot_error;
 }
 
-#ifdef CONFIG_X86_64
-int default_cpu_present_to_apicid(int mps_cpu)
-{
-       return __default_cpu_present_to_apicid(mps_cpu);
-}
-
-int default_check_phys_apicid_present(int boot_cpu_physical_apicid)
-{
-       return __default_check_phys_apicid_present(boot_cpu_physical_apicid);
-}
-#endif
-
 int __cpuinit native_cpu_up(unsigned int cpu)
 {
        int apicid = apic->cpu_present_to_apicid(cpu);