mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Cyrill Gorcunov <gorcunov@openvz.org>
Subject: [PATCH] x86: use hard_smp_processor_id to get apic id in identify_cpu -v2
Date: Tue, 25 Aug 2009 15:06:58 -0700	[thread overview]
Message-ID: <4A946082.9090809@kernel.org> (raw)
In-Reply-To: <4A9391CD.5020804@kernel.org>



and leave phys_proc_id to use initial apic id.

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

-v2: update the one in detect_extended_topology too.

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

---
 arch/x86/kernel/cpu/addon_cpuid_features.c |    4 ++--
 arch/x86/kernel/cpu/common.c               |    4 ++--
 2 files changed, 4 insertions(+), 4 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
 
 	/*
Index: linux-2.6/arch/x86/kernel/cpu/addon_cpuid_features.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/addon_cpuid_features.c
+++ linux-2.6/arch/x86/kernel/cpu/addon_cpuid_features.c
@@ -121,9 +121,9 @@ void __cpuinit detect_extended_topology(
 						 & core_select_mask;
 	c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid, core_plus_mask_width);
 	/*
-	 * Reinit the apicid, now that we have extended initial_apicid.
+	 * Reinit the apicid, now that we have extended apicid ?
 	 */
-	c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
+	c->apicid = hard_smp_processor_id();
 
 	c->x86_max_cores = (core_level_siblings / smp_num_siblings);
 

  parent reply	other threads:[~2009-08-25 22:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-25  7:25 [PATCH] x86: use hard_smp_processor_id to get apic id in identify_cpu Yinghai Lu
2009-08-25 19:51 ` [PATCH] x86: use c->apicid directly in srat_detect_node Yinghai Lu
2009-08-25 22:06 ` Yinghai Lu [this message]
2009-08-25 22:53   ` [PATCH] x86: use hard_smp_processor_id to get apic id in identify_cpu -v2 Suresh Siddha
2009-08-26  1:14     ` Yinghai Lu
2009-08-26 17:49       ` Suresh Siddha
2009-08-26 19:07         ` Yinghai Lu
2009-08-26 22:24           ` Suresh Siddha
2009-08-29 20:17             ` [PATCH] x86: use hard_smp_processor_id to get apic id for amd k8 cpus Yinghai Lu
2009-09-04  7:59               ` [tip:x86/cpu] x86: Use hard_smp_processor_id() to get apic id for AMD K8 cpus tip-bot for Yinghai Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A946082.9090809@kernel.org \
    --to=yinghai@kernel.org \
    --cc=gorcunov@openvz.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome