mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/6] riscv: hwprobe: do not report disabled extensions
@ 2026-10-06  7:52 Radim Krčmář
  2026-10-06  7:52 ` [PATCH 1/6] riscv: hwprobe: Report FP extensions only when available Radim Krčmář
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Radim Krčmář @ 2026-10-06  7:52 UTC (permalink / raw)
  To: linux-riscv
  Cc: linux-kernel, Paul Walmsley, Palmer Dabbelt, Alexandre Ghiti,
	Samuel Holland, Andy Chiu, Guodong Xu, Zong Li, Charlie Jenkins

I understand hwprobe to be an interface to query the features of
user-mode execution environment.
Some RISC-V extensions need to be enabled in user-mode through the use
of higher-mode controls (like sstatus, senvcfg, or sstateen), and when
we for some reason never enable the extensions (disabled in config, by
boot parameter, heterogenous platform alignment, etc.), hwprobe should
not report that the extensions are present.

This series brings the user-mode extension reporting into a state that
is more consistent with the user-mode observable extension set.

There are minor overlaps with Andy Chui's series to report the dynamic
state of higher-mode controls through hwprobe [1].
Andy's series adds another layer that can query features whose
availability depends on runtime variables, while this series is covering
constraints that the user-mode cannot influence.

This series doesn't touch Zicntr and Zihpm since those will require more
discussion.  Zicntr could be reported through Andy's mechanism based on
the sysctl status and Zihpm might be somehow reinterpreted for perf
availability or just ignored.

Applies to riscv/for-next just as well as to v7.3-rc6.

---
1: https://lore.kernel.org/linux-riscv/20260725001614.2578617-1-tchiu@tenstorrent.com/


Radim Krčmář (6):
  riscv: hwprobe: Report FP extensions only when available
  riscv: hwprobe: Report Zicbom and Zicboz only when available
  riscv: hwprobe: Report Zicfilp and Zicfiss only when available
  riscv: hwprobe: Report Supm only when available
  riscv: hwprobe: Report XTheadVector only when available
  riscv: hwprobe: Report SiFive vector extensions only when available

 arch/riscv/include/asm/usercfi.h              |  9 ++-
 arch/riscv/kernel/sys_hwprobe.c               | 55 ++++++++++++-------
 .../kernel/vendor_extensions/sifive_hwprobe.c | 14 +++--
 .../kernel/vendor_extensions/thead_hwprobe.c  |  5 +-
 4 files changed, 55 insertions(+), 28 deletions(-)

-- 
2.55.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-10-07  8:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-06  7:52 [PATCH 0/6] riscv: hwprobe: do not report disabled extensions Radim Krčmář
2026-10-06  7:52 ` [PATCH 1/6] riscv: hwprobe: Report FP extensions only when available Radim Krčmář
2026-10-06 23:54   ` Charlie Jenkins
2026-10-07  7:46     ` Radim Krčmář
2026-10-07  8:05       ` Charlie Jenkins
2026-10-06  7:52 ` [PATCH 2/6] riscv: hwprobe: Report Zicbom and Zicboz " Radim Krčmář
2026-10-06  7:53 ` [PATCH 3/6] riscv: hwprobe: Report Zicfilp and Zicfiss " Radim Krčmář
2026-10-06  7:53 ` [PATCH 4/6] riscv: hwprobe: Report Supm " Radim Krčmář
2026-10-06  7:53 ` [PATCH 5/6] riscv: hwprobe: Report XTheadVector " Radim Krčmář
2026-10-06 23:54   ` Charlie Jenkins
2026-10-07  7:59     ` Radim Krčmář
2026-10-07  8:07       ` Charlie Jenkins
2026-10-06  7:53 ` [PATCH 6/6] riscv: hwprobe: Report SiFive vector extensions " Radim Krčmář

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®