powerpc/perf/core-book3s: Avoid loading platform pmu driver during dump kernel
Madhavan Srinivasan
maintainerPATCH 1/4 powerpc/perf/core-book3s: Avoid loading platform pmu driver during dump kernel
Platform pmu driver may not be used in the dump kernel. Avoid loading it.
--- arch/powerpc/perf/core-book3s.c | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/powerpc/perf/core-book3s.c +8 -0
@@ -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 ;
Signature · 1 line
2.47.0
Madhavan Srinivasan
maintainerPATCH 2/4 powerpc/perf/hv-24x7: Avoid loading hv-24x7 during dump kernel
hv-24x7 pmu driver is intended to get system-wide resourse metrics and may not be used during the dump kernel, avoid loading it
--- arch/powerpc/perf/hv-24x7.c | 3 +++ arch/powerpc/perf/hv-common.h | 2 ++ 2 files changed, 5 insertions(+)
arch/powerpc/perf/hv-24x7.c +3 -0
@@ -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 ;
arch/powerpc/perf/hv-common.h +2 -0
@@ -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;
Signature · 1 line
2.47.0
Madhavan Srinivasan
maintainerPATCH 3/4 powerpc/perf/hv-gpci: Avoid loading hv-gpci pmu during dump kernel
In reply to Madhavan Srinivasanhv-gpci pmu driver is intended to get powervm hypervisor system-wide metrics and this may not be used during the dump kernel, avoid loading it
--- arch/powerpc/perf/hv-gpci.c | 3 +++ 1 file changed, 3 insertions(+)
arch/powerpc/perf/hv-gpci.c +3 -0
@@ -989,6 +989,9 @@ static int hv_gpci_init(void)struct hv_perf_caps caps;struct hv_gpci_request_buffer *arg; +if (is_kdump_kernel () ||is_fadump_active ()) +return 0 ; +hv_gpci_assert_offsets_correct ();if (!firmware_has_feature (FW_FEATURE_LPAR )) {
Signature · 1 line
2.47.0
Madhavan Srinivasan
maintainerPATCH 4/4 powerpc/perf/vpa-pmu: Avoid loading vpa-pmy driver during dump kernel
In reply to Madhavan Srinivasanvpa-pmu driver is used to collect latency metrics for host to guest or guest to host context switches in a PowerVM KVM guest scenario. This may not be used during the dump kernel, avoid loading it
--- arch/powerpc/perf/vpa-pmu.c | 5 +++++ 1 file changed, 5 insertions(+)
arch/powerpc/perf/vpa-pmu.c +5 -0
@@ -10,6 +10,8 @@#include <linux/perf_event.h> #include <asm/kvm_ppc.h> #include <asm/kvm_book3s_64.h> +#include <asm/fadump.h> +#include <asm/kexec.h> #define MODULE_VERS "1.0"#define MODULE_NAME "pseries_vpa_pmu"
@@ -183,6 +185,9 @@ static int __init pseries_vpa_pmu_init(void)if (!firmware_has_feature (FW_FEATURE_LPAR ) ||is_kvm_guest ())return -ENODEV ; +if (is_kdump_kernel () ||is_fadump_active ()) +return 0 ; +perf_pmu_register (&vpa_pmu, vpa_pmu.name,-1 );pr_info ("Virtual Processor Area PMU registered.\n" );
Signature · 1 line
2.47.0