From: "tip-bot2 for Sandipan Das" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Mario Limonciello <mario.limonciello@amd.com>,
Sandipan Das <sandipan.das@amd.com>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: perf/urgent] perf/x86/amd/core: Avoid register reset when CPU is dead
Date: Wed, 13 Mar 2024 10:22:36 -0000 [thread overview]
Message-ID: <171032535648.398.6298108731990613596.tip-bot2@tip-bot2> (raw)
In-Reply-To: =?utf-8?q?=3C550a026764342cf7e5812680e3e2b91fe662b5ac=2E17065?= =?utf-8?q?26029=2Egit=2Esandipan=2Edas=40amd=2Ecom=3E?=
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: ad8c91282c95f801c37812d59d2d9eba6899b384
Gitweb: https://git.kernel.org/tip/ad8c91282c95f801c37812d59d2d9eba6899b384
Author: Sandipan Das <sandipan.das@amd.com>
AuthorDate: Mon, 29 Jan 2024 16:36:26 +05:30
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 13 Mar 2024 11:01:30 +01:00
perf/x86/amd/core: Avoid register reset when CPU is dead
When bringing a CPU online, some of the PMC and LBR related registers
are reset. The same is done when a CPU is taken offline although that
is unnecessary. This currently happens in the "cpu_dead" callback which
is also incorrect as the callback runs on a control CPU instead of the
one that is being taken offline. This also affects hibernation and
suspend to RAM on some platforms as reported in the link below.
Fixes: 21d59e3e2c40 ("perf/x86/amd/core: Detect PerfMonV2 support")
Reported-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Sandipan Das <sandipan.das@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/550a026764342cf7e5812680e3e2b91fe662b5ac.1706526029.git.sandipan.das@amd.com
---
arch/x86/events/amd/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/events/amd/core.c b/arch/x86/events/amd/core.c
index 69a3b02..aec16e5 100644
--- a/arch/x86/events/amd/core.c
+++ b/arch/x86/events/amd/core.c
@@ -604,7 +604,6 @@ static void amd_pmu_cpu_dead(int cpu)
kfree(cpuhw->lbr_sel);
cpuhw->lbr_sel = NULL;
- amd_pmu_cpu_reset(cpu);
if (!x86_pmu.amd_nb_constraints)
return;
reply other threads:[~2024-03-13 10:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=171032535648.398.6298108731990613596.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=sandipan.das@amd.com \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®