From: Suresh Siddha <suresh.b.siddha@intel.com>
To: mingo@elte.hu, hpa@zytor.com, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, yhlu.kernel@gmail.com,
Suresh Siddha <suresh.b.siddha@intel.com>
Subject: [patch 2/2] x2apic: use x2apic id reported by cpuid during topology discovery
Date: Tue, 26 Aug 2008 11:38:07 -0700 [thread overview]
Message-ID: <20080826183910.047665000@linux-os.sc.intel.com> (raw)
In-Reply-To: 20080826183909.887903000@linux-os.sc.intel.com
[-- Attachment #1: use_initial_apicid_x2apic.patch --]
[-- Type: text/plain, Size: 1716 bytes --]
use x2apic id reported by cpuid during topology discovery, instead of the
apic id configured in the APIC. For most of the systems, x2apic id
reported by cpuid leaf 0xb will be same as the physical apic id reported
by the APIC_ID register of the APIC. We follow the suggested guidelines
and use the apic id reported by the cpuid.
No change to non-generic UV platforms, will use the apic id reported in the
APIC_ID register as the cpuid reported apic id's may not be unique.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
Index: tip/arch/x86/kernel/genx2apic_cluster.c
===================================================================
--- tip.orig/arch/x86/kernel/genx2apic_cluster.c 2008-08-25 11:25:47.000000000 -0700
+++ tip/arch/x86/kernel/genx2apic_cluster.c 2008-08-25 13:15:45.000000000 -0700
@@ -120,14 +120,9 @@
return x;
}
-static unsigned int x2apic_read_id(void)
-{
- return apic_read(APIC_ID);
-}
-
static unsigned int phys_pkg_id(int index_msb)
{
- return x2apic_read_id() >> index_msb;
+ return current_cpu_data.initial_apicid >> index_msb;
}
static void x2apic_send_IPI_self(int vector)
Index: tip/arch/x86/kernel/genx2apic_phys.c
===================================================================
--- tip.orig/arch/x86/kernel/genx2apic_phys.c 2008-08-25 11:25:47.000000000 -0700
+++ tip/arch/x86/kernel/genx2apic_phys.c 2008-08-25 13:15:45.000000000 -0700
@@ -118,14 +118,9 @@
return x;
}
-static unsigned int x2apic_read_id(void)
-{
- return apic_read(APIC_ID);
-}
-
static unsigned int phys_pkg_id(int index_msb)
{
- return x2apic_read_id() >> index_msb;
+ return current_cpu_data.initial_apicid >> index_msb;
}
void x2apic_send_IPI_self(int vector)
--
next prev parent reply other threads:[~2008-08-26 18:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-26 18:38 [patch 1/2] x2apic: use cpuid vector 0xb when available for detecting cpu topology - v2 Suresh Siddha
2008-08-26 18:38 ` Suresh Siddha [this message]
2008-08-27 7:04 ` [patch 2/2] x2apic: use x2apic id reported by cpuid during topology discovery Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2008-08-18 18:13 [patch 1/2] x2apic: use cpuid vector 0xb when available for detecting cpu topology Suresh Siddha
2008-08-18 18:13 ` [patch 2/2] x2apic: use x2apic id reported by cpuid during topology discovery Suresh Siddha
2008-08-19 0:24 ` Ingo Molnar
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=20080826183910.047665000@linux-os.sc.intel.com \
--to=suresh.b.siddha@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=yhlu.kernel@gmail.com \
/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