Re: [PATCH v1 2/2] perf: RISC-V: store available counter mask as bitmap
Paul Walmsley <[email protected]>
| Newsgroups | org.kernel.vger.linux-perf-users,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On Fri, 7 Aug 2026, Xixin Liu wrote: > The available-counter mask was a single unsigned long, but iteration > uses RISCV_MAX_COUNTERS (64). On RV32 that reads past the object. Filling > with BIT(i) is also wrong for i >= 32. > > Use DECLARE_BITMAP, set_bit/bitmap helpers, and stop counters one word > at a time. > > Signed-off-by: Xixin Liu <[email protected]> This patch contains several array indexes to element 0 of the cmask bitmap, but that element is going to be XLEN bits wide. Does that actually work on RV32 systems? - Paul