linux/x86: don't initialize cpu_data[]'s apicid field on generic code
PATCH 1/1 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 <[email protected]>
arch/i386/kernel/cpu/common-xen.c +2 -0
@@ -301,11 +301,13 @@ void __cpuinit generic_identify(struct cif (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 ;
arch/x86_64/kernel/setup-xen.c +2 -0
@@ -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