Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] riscv: hwprobe: Add Zicbop support
@ 2025-10-09 13:41 Yao Zihong
  2025-10-09 13:41 ` [PATCH v2 1/4] uapi: riscv: hwprobe: Add Zicbop extension bit and block-size key Yao Zihong
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Yao Zihong @ 2025-10-09 13:41 UTC (permalink / raw)
  To: linux-riscv, linux-kernel
  Cc: ajones, alexghiti, shuah, samuel.holland, evan, cleger,
	zihong.plct, zihongyao, zhangyin2018, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti

Changes since v1:
------------------
- Bump RISCV_HWPROBE_MAX_KEY (modified 1/4).
- Add documentation for the Zicbop hwprobe bit/key (new 3/4).
- Add a selftest(prefetch.c) for Zicbop (new 4/4).

Add UAPI and kernel plumbing to expose the Zicbop extension presence
and its block size through hwprobe. The interface mirrors
Zicbom/Zicboz. This allows userspace to safely discover and optimize
for Zicbop when available.

Background: Zicbop is mandated by the RVA22U64 profile. Downstream may
combine the presence bit with ZICBOP_BLOCK_SIZE to make profile-level
policy decisions or enable Zicbop-specific optimizations.

Yao Zihong (4):
  uapi: riscv: hwprobe: Add Zicbop extension bit and block-size key
  riscv: hwprobe: Report Zicbop presence and block size
  docs: riscv: Document hwprobe for Zicbop
  selftests/riscv: Add Zicbop prefetch test

 Documentation/arch/riscv/hwprobe.rst          |   8 +-
 arch/riscv/include/asm/hwprobe.h              |   2 +-
 arch/riscv/include/uapi/asm/hwprobe.h         |   2 +
 arch/riscv/kernel/sys_hwprobe.c               |   6 +
 .../testing/selftests/riscv/hwprobe/Makefile  |   5 +-
 .../selftests/riscv/hwprobe/prefetch.c        | 236 ++++++++++++++++++
 6 files changed, 256 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/riscv/hwprobe/prefetch.c

-- 
2.47.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2025-10-13 17:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-09 13:41 [PATCH v2 0/4] riscv: hwprobe: Add Zicbop support Yao Zihong
2025-10-09 13:41 ` [PATCH v2 1/4] uapi: riscv: hwprobe: Add Zicbop extension bit and block-size key Yao Zihong
2025-10-09 17:08   ` Andrew Jones
2025-10-09 13:41 ` [PATCH v2 2/4] riscv: hwprobe: Report Zicbop presence and block size Yao Zihong
2025-10-09 17:08   ` Andrew Jones
2025-10-09 13:41 ` [PATCH v2 3/4] docs: riscv: Document hwprobe for Zicbop Yao Zihong
2025-10-09 16:46   ` Andrew Jones
2025-10-09 13:41 ` [PATCH v2 4/4] selftests/riscv: Add Zicbop prefetch test Yao Zihong
2025-10-09 17:06   ` Andrew Jones
2025-10-13 16:16     ` Yao Zihong
2025-10-13 17:41       ` Andrew Jones
2025-10-09 17:09 ` [PATCH v2 0/4] riscv: hwprobe: Add Zicbop support Andrew Jones
2025-10-13 16:15   ` Yao Zihong

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