drivers/perf: riscv: Fix Platform firmware event data
authorAtish Patra <atishp@rivosinc.com>
Fri, 13 Dec 2024 00:09:32 +0000 (16:09 -0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 9 Jan 2025 17:37:08 +0000 (09:37 -0800)
commitfc58db9aeb15e89b69ff5e9abc69ecf9e5f888ed
treea7a8789ef9d5b0e209bfd50ed95a0b54689ccf09
parent40384c840ea1944d7c5a392e8975ed088ecf0b37
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>
arch/riscv/include/asm/sbi.h
drivers/perf/riscv_pmu_sbi.c