Unverified Commit c6251549 authored by Pu Lehui's avatar Pu Lehui Committed by Palmer Dabbelt
Browse files

drivers/perf: riscv: Align errno for unsupported perf event



RISC-V perf driver does not yet support PERF_TYPE_BREAKPOINT. It would
be more appropriate to return -EOPNOTSUPP or -ENOENT for this type in
pmu_sbi_event_map. Considering that other implementations return -ENOENT
for unsupported perf types, let's synchronize this behavior. Due to this
reason, a riscv bpf testcases perf_skip fail. Meanwhile, align that
behavior to the rest of proper place.

Signed-off-by: default avatarPu Lehui <pulehui@huawei.com>
Reviewed-by: default avatarAtish Patra <atishp@rivosinc.com>
Fixes: 9b3e150e ("RISC-V: Add a simple platform driver for RISC-V legacy perf")
Fixes: 16d3b1af ("perf: RISC-V: Check standard event availability")
Fixes: e9991434 ("RISC-V: Add perf platform driver based on SBI PMU extension")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240831071520.1630360-1-pulehui@huaweicloud.com


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 9852d85e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment