From: Madhavan Srinivasan <maddy@linux.ibm.com>
To: mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu
Cc: linuxppc-dev@lists.ozlabs.org, Madhavan Srinivasan <maddy@linux.ibm.com>
Subject: [PATCH v2 2/4] powerpc/perf/hv-24x7: Avoid loading hv-24x7 during dump kernel
Date: Sat, 1 Mar 2025 23:53:08 +0530 [thread overview]
Message-ID: <20250301182310.6832-2-maddy@linux.ibm.com> (raw)
In-Reply-To: <20250301182310.6832-1-maddy@linux.ibm.com>
hv-24x7 pmu driver are intended to get system-wide resourse
metrics and these are built-in. hv-24x7 pmu does not have
commandline option to disable them. Add check for kdump and
fadump kernel to avoids loading them.
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
---
Changelog v1:
- Added more details to commmit message
arch/powerpc/perf/hv-24x7.c | 3 +++
arch/powerpc/perf/hv-common.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
index d400fa391c27..3a626cd8cf54 100644
--- a/arch/powerpc/perf/hv-24x7.c
+++ b/arch/powerpc/perf/hv-24x7.c
@@ -1698,6 +1698,9 @@ static int hv_24x7_init(void)
unsigned int pvr = mfspr(SPRN_PVR);
struct hv_perf_caps caps;
+ if (is_kdump_kernel() || is_fadump_active())
+ return 0;
+
if (!firmware_has_feature(FW_FEATURE_LPAR)) {
pr_debug("not a virtualized system, not enabling\n");
return -ENODEV;
diff --git a/arch/powerpc/perf/hv-common.h b/arch/powerpc/perf/hv-common.h
index 2cce17bc321c..a4c062d2264e 100644
--- a/arch/powerpc/perf/hv-common.h
+++ b/arch/powerpc/perf/hv-common.h
@@ -4,6 +4,8 @@
#include <linux/perf_event.h>
#include <linux/types.h>
+#include <asm/fadump.h>
+#include <asm/kexec.h>
struct hv_perf_caps {
u16 version;
--
2.47.0
next prev parent reply other threads:[~2025-03-01 18:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-01 18:23 [PATCH v2 1/4] powerpc/perf/core-book3s: Avoid loading platform pmu driver during dump kernel Madhavan Srinivasan
2025-03-01 18:23 ` Madhavan Srinivasan [this message]
2025-03-02 12:20 ` [PATCH v2 2/4] powerpc/perf/hv-24x7: Avoid loading hv-24x7 " kernel test robot
2025-03-01 18:23 ` [PATCH v2 3/4] powerpc/perf/hv-gpci: Avoid loading hv-gpci pmu " Madhavan Srinivasan
2025-03-01 18:23 ` [PATCH v2 4/4] powerpc/perf/vpa-pmu: Avoid loading vpa-pmu driver " Madhavan Srinivasan
2025-03-02 10:13 ` [PATCH v2 1/4] powerpc/perf/core-book3s: Avoid loading platform pmu " kernel test robot
2025-03-05 15:29 ` kernel test robot
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=20250301182310.6832-2-maddy@linux.ibm.com \
--to=maddy@linux.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@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;
as well as URLs for NNTP newsgroup(s).