Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] riscv: hwprobe: Add Zicbop support
@ 2025-10-20 15:29 Yao Zihong
  2025-10-20 15:33 ` [PATCH v3 1/2] riscv: hwprobe: Expose Zicbop extension and its block size Yao Zihong
  2025-10-20 15:37 ` [PATCH v3 2/2] selftests/riscv: Add Zicbop prefetch test Yao Zihong
  0 siblings, 2 replies; 7+ messages in thread
From: Yao Zihong @ 2025-10-20 15:29 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 v2:
------------------
- Squash the previous UAPI/kernel/doc patches(originally 1/4, 2/4, 3/4)
  into a single hwprobe patch for simplicity.
- Selftests:
  * Drop the `memory` clobber from the prefetch inline asm since it is
    pure hint.
  * Fix style problems. (Andrew Jones)
  * Merge the standalone prefetch test into 
    `tools/testing/selftests/riscv/hwprobe/cbo.c` (Andrew Jones)
  * Switch to `getopt_long` for option parsing. (Andrew Jones)

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 (2):
  riscv: hwprobe: Expose Zicbop extension and its block size
  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 +
 tools/testing/selftests/riscv/hwprobe/cbo.c | 188 +++++++++++++++++---
 5 files changed, 175 insertions(+), 31 deletions(-)

-- 
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] 7+ messages in thread

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-20 15:29 [PATCH v3 0/2] riscv: hwprobe: Add Zicbop support Yao Zihong
2025-10-20 15:33 ` [PATCH v3 1/2] riscv: hwprobe: Expose Zicbop extension and its block size Yao Zihong
2025-10-21 23:21   ` Andrew Jones
2025-10-20 15:37 ` [PATCH v3 2/2] selftests/riscv: Add Zicbop prefetch test Yao Zihong
2025-10-21 23:32   ` Andrew Jones
2025-10-23 15:48     ` Yao Zihong
2025-10-30 21:16       ` Andrew Jones

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