Skip to content

lib: sbi_pmu: propagate hardware counter errors

Sebastian Alba Vives opensbi 2 versions Applied

Status from this message: Applied this series to the riscv/opensbi repo.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- 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.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2lib: sbi_pmu: do not ignore pmu_ctr_start_hw() error in cfg_matchlib/sbi/sbi_pmu.c+5 -20 replies
2/2lib: sbi_pmu: reject out-of-bounds counter index in pmu_ctr_write_hw()lib/sbi/sbi_pmu.c+12 -30 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchAnup Patel
1/2
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] lib: sbi_pmu: propagate hardware counter errors

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/[email protected]

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()

 lib/sbi/sbi_pmu.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)
Signature · 7 lines
2.43.0


-- 
opensbi mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/opensbi