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

[Xen-changelog] [linux-2.6.18-xen] xen/x86: don't initialize cpu_data[]'s apicid field on generic code



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1242292155 -3600
# Node ID 9cbcc9008446c10d8d7d8b8f39ecdf70a5418a17
# Parent  9b945480054430882b60bb5e5f660822a1c07b70
xen/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).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 arch/i386/kernel/cpu/common-xen.c |    2 ++
 arch/x86_64/kernel/setup-xen.c    |    2 ++
 2 files changed, 4 insertions(+)

diff -r 9b9454800544 -r 9cbcc9008446 arch/i386/kernel/cpu/common-xen.c
--- a/arch/i386/kernel/cpu/common-xen.c Thu May 14 10:08:40 2009 +0100
+++ b/arch/i386/kernel/cpu/common-xen.c Thu May 14 10:09:15 2009 +0100
@@ -301,10 +301,12 @@ 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 */
diff -r 9b9454800544 -r 9cbcc9008446 arch/x86_64/kernel/setup-xen.c
--- a/arch/x86_64/kernel/setup-xen.c    Thu May 14 10:08:40 2009 +0100
+++ b/arch/x86_64/kernel/setup-xen.c    Thu May 14 10:09:15 2009 +0100
@@ -1380,7 +1380,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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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