From: tip-bot for Prarit Bhargava <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: peterz@infradead.org, bp@suse.de, jolsa@redhat.com,
prarit@redhat.com, vincent.weaver@maine.edu, tglx@linutronix.de,
hpa@zytor.com, acme@redhat.com, kan.liang@intel.com,
eranian@google.com, alexander.shishkin@linux.intel.com,
harish.chegondi@intel.com, linux-kernel@vger.kernel.org,
mingo@kernel.org, torvalds@linux-foundation.org
Subject: [tip:perf/urgent] perf/x86/intel/uncore: Fix hardcoded socket 0 assumption in the Haswell init code
Date: Sun, 8 Jan 2017 22:43:21 -0800 [thread overview]
Message-ID: <tip-fa37361e291bfe528872b9aef5c8644a3fc7ff20@git.kernel.org> (raw)
In-Reply-To: <1483628965-2890-1-git-send-email-prarit@redhat.com>
Commit-ID: fa37361e291bfe528872b9aef5c8644a3fc7ff20
Gitweb: http://git.kernel.org/tip/fa37361e291bfe528872b9aef5c8644a3fc7ff20
Author: Prarit Bhargava <prarit@redhat.com>
AuthorDate: Thu, 5 Jan 2017 10:09:25 -0500
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 7 Jan 2017 08:54:38 +0100
perf/x86/intel/uncore: Fix hardcoded socket 0 assumption in the Haswell init code
On multi-socket Intel v3 processor systems (aka Haswell), kdump can crash
in hswep_uncore_cpu_init():
BUG: unable to handle kernel paging request at 00000000006563a1
IP: [<ffffffff8101b582>] hswep_uncore_cpu_init+0x52/0xa0
The crash was introduced by the following commit:
9d85eb9119f4 ("x86/smpboot: Make logical package management more robust")
... which patch corrected the physical ID to logical ID mapping of the
threads if the kdumped panic occurs on any socket other than socket 0.
But hswep_uncore_cpu_init() is hard coded for physical socket 0 and if the
system is kdump'ing on any other socket the logical package value will be
incorrect - crashing the kdump kernel.
The code should not use 0 as the physical ID, and should use the boot
CPU's logical package ID in this calculation.
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Harish Chegondi <harish.chegondi@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1483628965-2890-1-git-send-email-prarit@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/events/intel/uncore_snbep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
index e6832be..dae2fed 100644
--- a/arch/x86/events/intel/uncore_snbep.c
+++ b/arch/x86/events/intel/uncore_snbep.c
@@ -2686,7 +2686,7 @@ static struct intel_uncore_type *hswep_msr_uncores[] = {
void hswep_uncore_cpu_init(void)
{
- int pkg = topology_phys_to_logical_pkg(0);
+ int pkg = boot_cpu_data.logical_proc_id;
if (hswep_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores)
hswep_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;
next prev parent reply other threads:[~2017-01-09 6:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-05 15:09 [PATCH v2] perf/x86/intel/uncore: Remove hardcoded socket 0 in " Prarit Bhargava
2017-01-09 6:43 ` tip-bot for Prarit Bhargava [this message]
2017-01-11 11:15 ` [tip:perf/urgent] perf/x86/intel/uncore: Fix hardcoded socket 0 assumption in the " tip-bot for Prarit Bhargava
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-fa37361e291bfe528872b9aef5c8644a3fc7ff20@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bp@suse.de \
--cc=eranian@google.com \
--cc=harish.chegondi@intel.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=prarit@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vincent.weaver@maine.edu \
/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