]> git.baikalelectronics.ru Git - kernel.git/commit
perf: RISC-V: exclude invalid pmu counters from SBI calls
authorSergey Matyukevich <sergey.matyukevich@syntacore.com>
Tue, 30 Aug 2022 15:53:05 +0000 (18:53 +0300)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 8 Sep 2022 20:34:50 +0000 (13:34 -0700)
commitcca36592e72e420ac44124333c268028f54fcfe1
treeb2a498f8d14239173d11ee1a97a7911b356504e9
parentf73c0571e732fd5c4597f7bc2aee4cf6eb1480f3
perf: RISC-V: exclude invalid pmu counters from SBI calls

SBI firmware may not provide information for some counters in response
to SBI_EXT_PMU_COUNTER_GET_INFO call. Exclude such counters from the
subsequent SBI requests. For this purpose use global mask to keep track
of fully specified counters.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich@syntacore.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20220830155306.301714-3-geomatsi@gmail.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
drivers/perf/riscv_pmu_legacy.c
drivers/perf/riscv_pmu_sbi.c
include/linux/perf/riscv_pmu.h