From: tip-bot for Borislav Petkov <borislav.petkov@amd.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
a.p.zijlstra@chello.nl, andreas.herrmann3@amd.com,
tglx@linutronix.de, borislav.petkov@amd.com
Subject: [tip:x86/urgent] x86/smp: Fix topology checks on AMD MCM CPUs
Date: Thu, 14 Jun 2012 01:39:21 -0700 [thread overview]
Message-ID: <tip-161270fc1f9ddfc17154e0d49291472a9cdef7db@git.kernel.org> (raw)
In-Reply-To: <20120529135442.GE29157@aftab.osrc.amd.com>
Commit-ID: 161270fc1f9ddfc17154e0d49291472a9cdef7db
Gitweb: http://git.kernel.org/tip/161270fc1f9ddfc17154e0d49291472a9cdef7db
Author: Borislav Petkov <borislav.petkov@amd.com>
AuthorDate: Wed, 6 Jun 2012 17:31:26 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 13 Jun 2012 14:56:12 +0200
x86/smp: Fix topology checks on AMD MCM CPUs
The warning below triggers on AMD MCM packages because physical package
IDs on the cores of a _physical_ socket are the same. I.e., this field
says which CPUs belong to the same physical package.
However, the same two CPUs belong to two different internal, i.e.
"logical" nodes in the same physical socket which is reflected in the
CPU-to-node map on x86 with NUMA.
Which makes this check wrong on the above topologies so circumvent it.
[ 0.444413] Booting Node 0, Processors #1 #2 #3 #4 #5 Ok.
[ 0.461388] ------------[ cut here ]------------
[ 0.465997] WARNING: at arch/x86/kernel/smpboot.c:310 topology_sane.clone.1+0x6e/0x81()
[ 0.473960] Hardware name: Dinar
[ 0.477170] sched: CPU #6's mc-sibling CPU #0 is not on the same node! [node: 1 != 0]. Ignoring dependency.
[ 0.486860] Booting Node 1, Processors #6
[ 0.491104] Modules linked in:
[ 0.494141] Pid: 0, comm: swapper/6 Not tainted 3.4.0+ #1
[ 0.499510] Call Trace:
[ 0.501946] [<ffffffff8144bf92>] ? topology_sane.clone.1+0x6e/0x81
[ 0.508185] [<ffffffff8102f1fc>] warn_slowpath_common+0x85/0x9d
[ 0.514163] [<ffffffff8102f2b7>] warn_slowpath_fmt+0x46/0x48
[ 0.519881] [<ffffffff8144bf92>] topology_sane.clone.1+0x6e/0x81
[ 0.525943] [<ffffffff8144c234>] set_cpu_sibling_map+0x251/0x371
[ 0.532004] [<ffffffff8144c4ee>] start_secondary+0x19a/0x218
[ 0.537729] ---[ end trace 4eaa2a86a8e2da22 ]---
[ 0.628197] #7 #8 #9 #10 #11 Ok.
[ 0.807108] Booting Node 3, Processors #12 #13 #14 #15 #16 #17 Ok.
[ 0.897587] Booting Node 2, Processors #18 #19 #20 #21 #22 #23 Ok.
[ 0.917443] Brought up 24 CPUs
We ran a topology sanity check test we have here on it and
it all looks ok... hopefully :).
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20120529135442.GE29157@aftab.osrc.amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/smpboot.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index fd019d7..c3a6bac 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -349,9 +349,12 @@ static bool __cpuinit match_llc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
static bool __cpuinit match_mc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
{
- if (c->phys_proc_id == o->phys_proc_id)
- return topology_sane(c, o, "mc");
+ if (c->phys_proc_id == o->phys_proc_id) {
+ if (cpu_has(c, X86_FEATURE_AMD_DCM))
+ return true;
+ return topology_sane(c, o, "mc");
+ }
return false;
}
prev parent reply other threads:[~2012-06-14 8:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-29 13:54 WARNING: at arch/x86/kernel/smpboot.c:310 topology_sane.clone.1+0x6e/0x81() Borislav Petkov
2012-05-29 14:51 ` Peter Zijlstra
2012-05-29 15:29 ` Andreas Herrmann
2012-05-29 16:59 ` Peter Zijlstra
2012-05-29 17:13 ` Borislav Petkov
2012-05-29 17:25 ` Peter Zijlstra
2012-05-29 17:48 ` Andreas Herrmann
2012-06-04 12:41 ` [PATCH] x86, smp: Fix topology checks on AMD MCM Borislav Petkov
2012-06-04 12:43 ` Peter Zijlstra
2012-06-04 13:37 ` Borislav Petkov
2012-06-04 13:38 ` Peter Zijlstra
2012-06-04 14:48 ` Borislav Petkov
2012-06-04 14:56 ` Peter Zijlstra
2012-06-04 16:01 ` Borislav Petkov
2012-06-06 15:31 ` [PATCH -v2] " Borislav Petkov
2012-06-14 8:39 ` tip-bot for Borislav Petkov [this message]
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=tip-161270fc1f9ddfc17154e0d49291472a9cdef7db@git.kernel.org \
--to=borislav.petkov@amd.com \
--cc=a.p.zijlstra@chello.nl \
--cc=andreas.herrmann3@amd.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--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