[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] linux/x86: don't initialize cpu_data[]'s apicid field on generic code



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).

As usual, written and tested on 2.6.30-rc4 and made apply to the 2.6.18
tree without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- head-2009-05-04.orig/arch/i386/kernel/cpu/common-xen.c      2009-05-13 
14:06:24.000000000 +0200
+++ head-2009-05-04/arch/i386/kernel/cpu/common-xen.c   2009-05-04 
11:04:43.000000000 +0200
@@ -301,11 +301,13 @@ void __cpuinit generic_identify(struct 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 */
                        c->x86 = 4;
--- head-2009-05-04.orig/arch/x86_64/kernel/setup-xen.c 2009-05-13 
14:06:24.000000000 +0200
+++ head-2009-05-04/arch/x86_64/kernel/setup-xen.c      2009-05-04 
11:04:43.000000000 +0200
@@ -1378,7 +1378,9 @@ void __cpuinit identify_cpu(struct cpuin
                        c->x86_capability[2] = cpuid_edx(0x80860001);
        }
 
+#ifndef CONFIG_XEN
        c->apicid = phys_pkg_id(0);
+#endif
 
        /*
         * Vendor-specific initialization.  In this section we




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.