[PATCH v2 0/2] lib: sbi_pmu: propagate hardware counter errors
Anup Patel
anup at brainfault.org
Thu Oct 29 01:23:37 PDT 2026
On Sun, Oct 25, 2026 at 8:23 PM Sebastian Alba Vives
<sebasjosue84 at gmail.com> wrote:
>
> The two patches Anup asked for in the thread for Pengpeng Hou's
> SKIP_MATCH class check. v1 is at
>
> https://lore.kernel.org/r/20261025062836.2445655-1-sebasjosue84@gmail.com
>
> Changes in v2:
> - patch 1: propagate SBI_EALREADY_STARTED as well, per Anup's review.
> An already running counter may have been configured for a different
> event previously, so the configure must not report success. The
> commit message was reworked around that and the special case is gone.
> - patch 2: unchanged except for the context line that patch 1 touches.
> Picked up Anup's Reviewed-by.
>
> They stay a series because both touch the same if block in
> sbi_pmu_ctr_cfg_match() and the second does not apply without the first.
>
> Built clean for rv64 and rv32, PLATFORM=generic, no new warnings.
>
> Sebastian Alba Vives (2):
> lib: sbi_pmu: do not ignore pmu_ctr_start_hw() error in cfg_match
> lib: sbi_pmu: reject out-of-bounds counter index in pmu_ctr_write_hw()
Applied this series to the riscv/opensbi repo.
Thanks,
Anup
More information about the opensbi
mailing list