]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drivers/perf: riscv: Disable PERF_SAMPLE_BRANCH_* while not supported
authorPu Lehui <pulehui@huawei.com>
Tue, 12 Mar 2024 01:20:53 +0000 (01:20 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:38:10 +0000 (16:38 +0200)
commit041fd5189fe066b70049e59a8046ca31ac14d4dd
tree9c693d84e9ace214463a8c6ae22982bfe4868150
parent9aea12275ddf461fc2c70be32a9f3c69f59fb81d
drivers/perf: riscv: Disable PERF_SAMPLE_BRANCH_* while not supported

[ Upstream commit ea6873118493019474abbf57d5a800da365734df ]

RISC-V perf driver does not yet support branch sampling. Although the
specification is in the works [0], it is best to disable such events
until support is available, otherwise we will get unexpected results.
Due to this reason, two riscv bpf testcases get_branch_snapshot and
perf_branches/perf_branches_hw fail.

Link: https://github.com/riscv/riscv-control-transfer-records
Fixes: f5bfa23f576f ("RISC-V: Add a perf core library for pmu drivers")
Signed-off-by: Pu Lehui <pulehui@huawei.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240312012053.1178140-1-pulehui@huaweicloud.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/perf/riscv_pmu.c