summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShifrin Dmitry <[email protected]>2025-11-10 14:31:40 +0300
committerAnup Patel <[email protected]>2025-12-01 11:06:36 +0530
commitc9f856e23f61e7ccbd7d8414bb98c45a5f4f04f4 (patch)
tree29c6d3d6059bbb064a56d2e181ffb6a658bd43c7 /include
parentda05980de6ef4ed47354b9b2ac8b578f67e84039 (diff)
lib: sbi_pmu: Fix xINH bits configuring
Before this patch sbi_pmu_ctr_start() ignores flags received in sbi_pmu_ctr_cfg_match() including inhibit ones. To prevent it, save flags together with event_data and use them both in sbi_pmu_ctr_start(). Fixes: 1db95da2997b ("lib: sbi: sbi_pmu: fixed hw counters start for hart") Signed-off-by: Shifrin Dmitry <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_ecall_interface.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/sbi/sbi_ecall_interface.h b/include/sbi/sbi_ecall_interface.h
index af7a05af..76624e3f 100644
--- a/include/sbi/sbi_ecall_interface.h
+++ b/include/sbi/sbi_ecall_interface.h
@@ -291,6 +291,15 @@ struct sbi_pmu_event_info {
#define SBI_PMU_CFG_FLAG_SET_UINH (1 << 5)
#define SBI_PMU_CFG_FLAG_SET_SINH (1 << 6)
#define SBI_PMU_CFG_FLAG_SET_MINH (1 << 7)
+/* Event configuration mask */
+#define SBI_PMU_CFG_EVENT_MASK \
+ ( \
+ SBI_PMU_CFG_FLAG_SET_VUINH | \
+ SBI_PMU_CFG_FLAG_SET_VSINH | \
+ SBI_PMU_CFG_FLAG_SET_UINH | \
+ SBI_PMU_CFG_FLAG_SET_SINH | \
+ SBI_PMU_CFG_FLAG_SET_MINH \
+ )
/* Flags defined for counter start function */
#define SBI_PMU_START_FLAG_SET_INIT_VALUE (1 << 0)