linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/4] powerpc/perf/core-book3s: Avoid loading platform pmu driver during dump kernel
@ 2025-03-01 18:23 Madhavan Srinivasan
  2025-03-01 18:23 ` [PATCH v2 2/4] powerpc/perf/hv-24x7: Avoid loading hv-24x7 " Madhavan Srinivasan
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Madhavan Srinivasan @ 2025-03-01 18:23 UTC (permalink / raw)
  To: mpe, npiggin, christophe.leroy; +Cc: linuxppc-dev, Madhavan Srinivasan

Platform pmu driver are built-in and these does not
have a commandline parameter to avoid loading them
during the kdump kernel. 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/core-book3s.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index 2b79171ee185..9a009dff63b3 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -22,6 +22,8 @@
 
 #ifdef CONFIG_PPC64
 #include "internal.h"
+#include <asm/fadump.h>
+#include <asm/kexec.h>
 #endif
 
 #define BHRB_MAX_ENTRIES	32
@@ -2571,6 +2573,12 @@ static int __init init_ppc64_pmu(void)
 		return 0;
 	}
 
+	/*
+	 * If the dump kernel is active, skip loading these drivers
+	 */
+	if (is_kdump_kernel() || is_fadump_active())
+		return 0;
+
 	/* run through all the pmu drivers one at a time */
 	if (!init_power5_pmu())
 		return 0;
-- 
2.47.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-03-05 15:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2 2/4] powerpc/perf/hv-24x7: Avoid loading hv-24x7 " Madhavan Srinivasan
2025-03-02 12:20   ` 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

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).