[RFC PATCH v7 05/28] perf: arm_spe_pmu: Add PMBIDR_EL1 and PMSIDR_EL1 to struct arm_spe_pmu
Alexandru Elisei
alexandru.elisei at arm.com
Thu Sep 3 09:06:00 PDT 2026
Signed-off-by: Alexandru Elisei <alexandru.elisei at arm.com>
---
drivers/perf/arm_spe_pmu.c | 3 +++
include/linux/perf/arm_spe_pmu.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
index 79c571a649d5..42ba0924bd02 100644
--- a/drivers/perf/arm_spe_pmu.c
+++ b/drivers/perf/arm_spe_pmu.c
@@ -1095,6 +1095,7 @@ static void __arm_spe_pmu_dev_probe(void *info)
"profiling buffer owned by higher exception level\n");
return;
}
+ spe_pmu->pmbidr_el1 = reg;
/* Minimum alignment. If it's out-of-range, then fail the probe */
fld = FIELD_GET(PMBIDR_EL1_ALIGN, reg);
@@ -1107,6 +1108,8 @@ static void __arm_spe_pmu_dev_probe(void *info)
/* It's now safe to read PMSIDR and figure out what we've got */
reg = read_sysreg_s(SYS_PMSIDR_EL1);
+ spe_pmu->pmsidr_el1 = reg;
+
if (FIELD_GET(PMSIDR_EL1_FE, reg))
spe_pmu->features |= SPE_PMU_FEAT_FILT_EVT;
diff --git a/include/linux/perf/arm_spe_pmu.h b/include/linux/perf/arm_spe_pmu.h
index af86fd184050..97b14e236fcd 100644
--- a/include/linux/perf/arm_spe_pmu.h
+++ b/include/linux/perf/arm_spe_pmu.h
@@ -21,6 +21,8 @@ struct arm_spe_pmu {
cpumask_t supported_cpus;
struct hlist_node hotplug_node;
+ u64 pmbidr_el1;
+ u64 pmsidr_el1;
int irq; /* PPI */
u16 pmsver;
u16 min_period;
--
2.43.0
More information about the linux-arm-kernel
mailing list