mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] riscv: lib: add optimized memchr() and extend KUnit tests
@ 2026-05-20 15:55 Milan Tripkovic
  2026-05-20 15:55 ` [PATCH 1/2] riscv: lib: add memchr() implementation Milan Tripkovic
  2026-05-20 15:55 ` [PATCH 2/2] lib/string_kunit: extend benchmarks and unit test to memchr() Milan Tripkovic
  0 siblings, 2 replies; 4+ messages in thread
From: Milan Tripkovic @ 2026-05-20 15:55 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Kees Cook
  Cc: Alexandre Ghiti, Andy Shevchenko, linux-riscv, linux-kernel,
	linux-hardening, Dusan Stojkovic, Milan Tripkovic

From: Milan Tripkovic <Milan.Tripkovic@rt-rk.com>

Add an optimized assembly implementation of memchr() for RISC-V.
The implementation uses word-aligned loads and Zbb optimizations where
available, with a fallback for non-Zbb hardware.

The series also includes KUnit tests for functional verification 
and performance benchmarking.

Signed-off-by: Milan Tripkovic <Milan.Tripkovic@rt-rk.com>

Milan Tripkovic (2):
  riscv: lib: add memchr() implementation
  lib/string_kunit: extend benchmarks and unit test to memchr()

 arch/riscv/include/asm/string.h |   3 +-
 arch/riscv/lib/Makefile         |   1 +
 arch/riscv/lib/memchr.S         | 126 ++++++++++++++++++++++++++++++++
 arch/riscv/purgatory/Makefile   |   5 +-
 lib/tests/string_kunit.c        |  53 ++++++++++++++
 5 files changed, 186 insertions(+), 2 deletions(-)
 create mode 100644 arch/riscv/lib/memchr.S

-- 
2.43.0


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

end of thread, other threads:[~2026-08-06 17:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-20 15:55 [PATCH 0/2] riscv: lib: add optimized memchr() and extend KUnit tests Milan Tripkovic
2026-05-20 15:55 ` [PATCH 1/2] riscv: lib: add memchr() implementation Milan Tripkovic
2026-05-20 15:55 ` [PATCH 2/2] lib/string_kunit: extend benchmarks and unit test to memchr() Milan Tripkovic
2026-08-06 17:52   ` Paul Walmsley

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®