diff options
author | Atish Patra <atishp@rivosinc.com> | 2024-12-13 01:09:32 +0100 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2025-01-09 18:37:08 +0100 |
commit | fc58db9aeb15e89b69ff5e9abc69ecf9e5f888ed (patch) | |
tree | a7a8789ef9d5b0e209bfd50ed95a0b54689ccf09 /arch | |
parent | Linux 6.13-rc1 (diff) | |
download | linux-fc58db9aeb15e89b69ff5e9abc69ecf9e5f888ed.tar.xz linux-fc58db9aeb15e89b69ff5e9abc69ecf9e5f888ed.zip |
drivers/perf: riscv: Fix Platform firmware event data
Platform firmware event data field is allowed to be 62 bits for
Linux as uppper most two bits are reserved to indicate SBI fw or
platform specific firmware events.
However, the event data field is masked as per the hardware raw
event mask which is not correct.
Fix the platform firmware event data field with proper mask.
Fixes: f0c9363db2dd ("perf/riscv-sbi: Add platform specific firmware event handling")
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20241212-pmu_event_fixes_v2-v2-1-813e8a4f5962@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/riscv/include/asm/sbi.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h index 6c82318065cf..3d250824178b 100644 --- a/arch/riscv/include/asm/sbi.h +++ b/arch/riscv/include/asm/sbi.h @@ -159,6 +159,7 @@ struct riscv_pmu_snapshot_data { }; #define RISCV_PMU_RAW_EVENT_MASK GENMASK_ULL(47, 0) +#define RISCV_PMU_PLAT_FW_EVENT_MASK GENMASK_ULL(61, 0) #define RISCV_PMU_RAW_EVENT_IDX 0x20000 #define RISCV_PLAT_FW_EVENT 0xFFFF |