From: Keir Fraser Date: Thu, 14 May 2009 09:09:15 +0000 (+0100) Subject: xen/x86: don't initialize cpu_data[]'s apicid field on generic code X-Git-Tag: xen-3.4.0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8c27548677999e29589eeda5004df19b372fac31;p=legacy%2Flinux-2.6.18-xen.git 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 --- diff --git a/arch/i386/kernel/cpu/common-xen.c b/arch/i386/kernel/cpu/common-xen.c index e509783d..f582cc70 100644 --- a/arch/i386/kernel/cpu/common-xen.c +++ b/arch/i386/kernel/cpu/common-xen.c @@ -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 */ diff --git a/arch/x86_64/kernel/setup-xen.c b/arch/x86_64/kernel/setup-xen.c index 10ac4bb2..5d8d94e1 100644 --- a/arch/x86_64/kernel/setup-xen.c +++ b/arch/x86_64/kernel/setup-xen.c @@ -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