[RFC PATCH 0/5] RISC-V: hwprobe related stuff

Andrew Jones
2023-09-21T12:55:32Z

This series clarifies the hwprobe interface and introduces the first
hwprobe flag. The flag basically reverses hwprobe to go from getting
values for cpus to getting cpus for values. I've made the series an
RFC because for the first part, the clarification, I'm not sure if
the only person that needs clarification is me or not. If it's just
me, then consider me clarified and we can drop it. The second part,
the new flag, is an RFC, because so far the only use case is the CBO
hwprobe selftest, which this series is based on and the last patch of
the series applies the new hwprobe variant to it. If we don't believe
other use cases, or use cases that care about having to do the probing
inefficiently like the CBO test does before this series, will crop up,
then the second part of this series can be dropped.

Based-on: 20230918131518.56803-8-ajones@ventanamicro.com

Thanks,
drew

Andrew Jones (5):
RISC-V: hwprobe: Clarify cpus size parameter
RISC-V: selftests: Replace cpu_count with cpusetsize
RISC-V: hwprobe: Introduce which-cpus flag
RISC-V: selftests: Add which-cpus hwprobe test
RISC-V: selftests: Apply which-cpus flag to CBO hwprobe test

Documentation/riscv/hwprobe.rst | 27 ++-
arch/riscv/include/uapi/asm/hwprobe.h | 3 +
arch/riscv/kernel/sys_riscv.c | 162 +++++++++++++++++-
arch/riscv/kernel/vdso/hwprobe.c | 10 +-
.../testing/selftests/riscv/hwprobe/Makefile | 5 +-
tools/testing/selftests/riscv/hwprobe/cbo.c | 26 +--
.../testing/selftests/riscv/hwprobe/hwprobe.c | 2 +-
.../testing/selftests/riscv/hwprobe/hwprobe.h | 2 +-
.../selftests/riscv/hwprobe/which-cpus.c | 156 +++++++++++++++++
.../selftests/riscv/vector/vstate_prctl.c | 2 +-
10 files changed, 353 insertions(+), 42 deletions(-)
create mode 100644 tools/testing/selftests/riscv/hwprobe/which-cpus.c

--
2.41.0