lkml.org 
[lkml]   [2009]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] x86: use hard_smp_processor_id to get apic id in identify_cpu

and leave phys_proc_id to use initial apic id.

otherwise, system with apci id lifting will have wrong apicid in
/proc/cpuinfo

for 2.6.31 ?

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
arch/x86/kernel/cpu/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/x86/kernel/cpu/common.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/common.c
+++ linux-2.6/arch/x86/kernel/cpu/common.c
@@ -715,7 +715,7 @@ static void __cpuinit generic_identify(s
c->initial_apicid = (cpuid_ebx(1) >> 24) & 0xFF;
#ifdef CONFIG_X86_32
# ifdef CONFIG_X86_HT
- c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
+ c->apicid = hard_smp_processor_id();
# else
c->apicid = c->initial_apicid;
# endif
@@ -772,7 +772,7 @@ static void __cpuinit identify_cpu(struc
}

#ifdef CONFIG_X86_64
- c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
+ c->apicid = hard_smp_processor_id();
#endif

/*

\
 
 \ /
  Last update: 2009-08-25 09:29    [W:0.077 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site