From: ravikiran thirumalai Date: Mon, 26 Jun 2006 11:56:04 +0000 (+0200) Subject: [PATCH] x86_64: Use local APIC ID from local APIC instead of CPUID X-Git-Tag: v2.6.18-rc1~612^2~81 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=0f4fdb7fba0b3ec66df39d0e743e701404161fb8;p=~andy%2Flinux [PATCH] x86_64: Use local APIC ID from local APIC instead of CPUID vSMPowered systems use apic_cluster too. Forcing apic_physflat works on these systems too, but only if we change phys_pkg_id to use hard_smp_prcoessor_id() instead of cpuid_ebx. I am guessing other multichassi cluster systems would need this too. Signed-off-by: ravikiran thirumalai Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/kernel/genapic_flat.c b/arch/x86_64/kernel/genapic_flat.c index 1a2ab825be9..c66ca7b1d31 100644 --- a/arch/x86_64/kernel/genapic_flat.c +++ b/arch/x86_64/kernel/genapic_flat.c @@ -108,10 +108,7 @@ static unsigned int flat_cpu_mask_to_apicid(cpumask_t cpumask) static unsigned int phys_pkg_id(int index_msb) { - u32 ebx; - - ebx = cpuid_ebx(1); - return ((ebx >> 24) & 0xFF) >> index_msb; + return hard_smp_processor_id() >> index_msb; } struct genapic apic_flat = {