]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
imported patch git-a6c4e076ee4c1ea670e4faa55814e63dd08e3f29-xen git-a6c4e076ee4c1ea670e4faa55814e63dd08e3f29
authort_jeang <devnull@localhost>
Tue, 6 Jan 2009 12:05:21 +0000 (12:05 +0000)
committert_jeang <devnull@localhost>
Tue, 6 Jan 2009 12:05:21 +0000 (12:05 +0000)
arch/i386/kernel/cpu/common-xen.c
drivers/xen/core/smpboot.c
include/asm-i386/bugs.h
include/asm-i386/mach-xen/asm/processor.h

index e509783d9d8a9d41ed1349fbbbb35605b8c97c0e..a907aab8e4380e6ad257fabe77f75bba5f3b2e80 100644 (file)
@@ -358,7 +358,7 @@ __setup("serialnumber", x86_serial_nr_setup);
 /*
  * This does the hard work of actually picking apart the CPU stuff...
  */
-void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
+static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
 {
        int i;
 
@@ -468,15 +468,22 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
 
        /* Init Machine Check Exception if available. */
        mcheck_init(c);
+}
 
-       if (c == &boot_cpu_data)
-               sysenter_setup();
+void __init identify_boot_cpu(void)
+{
+       identify_cpu(&boot_cpu_data);
+       sysenter_setup();
        enable_sep_cpu();
+       mtrr_bp_init();
+}
 
-       if (c == &boot_cpu_data)
-               mtrr_bp_init();
-       else
-               mtrr_ap_init();
+void __cpuinit identify_secondary_cpu(struct cpuinfo_x86 *c)
+{
+       BUG_ON(c == &boot_cpu_data);
+       identify_cpu(c);
+       enable_sep_cpu();
+       mtrr_ap_init();
 }
 
 #ifdef CONFIG_X86_HT
index deb5f99183681ac626998887bc5f09e0c018700a..5b31d1f4a96bb91d243f5a4041a7290d9e26f4d5 100644 (file)
@@ -167,8 +167,16 @@ static void xen_smp_intr_exit(unsigned int cpu)
 
 void __cpuinit cpu_bringup(void)
 {
+       struct cpuinfo_x86 *c = cpu_data + smp_processor_id();
+
        cpu_init();
-       identify_cpu(cpu_data + smp_processor_id());
+       if (c != &boot_cpu_data) {
+#ifdef CONFIG_X86_32
+               identify_secondary_cpu(c);
+#else
+               identify_cpu(c);
+#endif
+       }
        touch_softlockup_watchdog();
        preempt_disable();
        local_irq_enable();
index 2a9e4ee5904d50b91d3b6310ed2e78451ce2630c..cce4c930b3f169cad7a7b4e77abeb65d4c32c5db 100644 (file)
@@ -180,7 +180,7 @@ extern void alternative_instructions(void);
 
 static void __init check_bugs(void)
 {
-       identify_cpu(&boot_cpu_data);
+       identify_boot_cpu();
 #ifndef CONFIG_SMP
        printk("CPU: ");
        print_cpu_info(&boot_cpu_data);
index ad8b9d47aededc966c8d6e608e67a45f128956ca..c7a0fbf9bb53449824ae36b79d2b1f9a01cbdf36 100644 (file)
@@ -114,7 +114,8 @@ extern struct cpuinfo_x86 cpu_data[];
 extern int cpu_llc_id[NR_CPUS];
 extern char ignore_fpu_irq;
 
-extern void identify_cpu(struct cpuinfo_x86 *);
+extern void identify_boot_cpu(void);
+extern void identify_secondary_cpu(struct cpuinfo_x86 *);
 extern void print_cpu_info(struct cpuinfo_x86 *);
 extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c);
 extern unsigned short num_cache_leaves;