]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
xen/x86: don't initialize cpu_data[]'s apicid field on generic code xen-3.4.0
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 14 May 2009 09:09:15 +0000 (10:09 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 14 May 2009 09:09:15 +0000 (10:09 +0100)
Afaict, this is not only redundant with the intialization done in
drivers/xen/core/smpboot.c, but actually results - at least for
secondary CPUs - in the Xen-specific value written to be later
overwritten with whatever the generic code determines (with no
guarantee that the two values are identical).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
arch/i386/kernel/cpu/common-xen.c
arch/x86_64/kernel/setup-xen.c

index e509783d9d8a9d41ed1349fbbbb35605b8c97c0e..f582cc70e65c9cdf981e32a57295931d56b31d2b 100644 (file)
@@ -301,10 +301,12 @@ void __cpuinit generic_identify(struct cpuinfo_x86 * c)
                        if (c->x86 >= 0x6)
                                c->x86_model += ((tfms >> 16) & 0xF) << 4;
                        c->x86_mask = tfms & 15;
+#ifndef CONFIG_XEN
 #ifdef CONFIG_X86_HT
                        c->apicid = phys_pkg_id((ebx >> 24) & 0xFF, 0);
 #else
                        c->apicid = (ebx >> 24) & 0xFF;
+#endif
 #endif
                } else {
                        /* Have CPUID level 0 only - unheard of */
index 10ac4bb24a26f167236b7fdc3cc410743af0dad7..5d8d94e1ce44bf3556ec0c060e1b5e14ddff5a73 100644 (file)
@@ -1380,7 +1380,9 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
                        c->x86_capability[2] = cpuid_edx(0x80860001);
        }
 
+#ifndef CONFIG_XEN
        c->apicid = phys_pkg_id(0);
+#endif
 
        /*
         * Vendor-specific initialization.  In this section we