public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Zbb + fast-unaligned string optimization
@ 2023-01-13 21:23 Heiko Stuebner
  2023-01-13 21:23 ` [PATCH 1/4] RISC-V: use bit-values instead of numbers to identify patched cpu-features Heiko Stuebner
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Heiko Stuebner @ 2023-01-13 21:23 UTC (permalink / raw)
  To: linux-riscv, palmer
  Cc: christoph.muellner, conor, philipp.tomsich, ajones, heiko,
	jszhang, Heiko Stuebner

From: Heiko Stuebner <heiko.stuebner@vrull.eu>

This is a follow-up to my Zbb-based string optimization series, that
then adds another strcmp variant for systems with Zbb that also can
do unaligned accesses fast in hardware.

For this it uses Palmer's series for hw-feature probing that would read
this property from firmware (devicetree), as the performance of unaligned
accesses is an implementation detail of the relevant cpu core.


Right now we're still in the middle of discussing how more complex
cpufeature-combinations should be handled in general, so this is more
of a concept on one possible way to do it.


Dependencies:
- my Zbb string series
  https://lore.kernel.org/r/20230113212301.3534711-1-heiko@sntech.de
- Palmer's hw-probing series
  https://lore.kernel.org/r/20221013163551.6775-1-palmer@rivosinc.com


Heiko Stuebner (4):
  RISC-V: use bit-values instead of numbers to identify patched
    cpu-features
  RISC-V: add alternative-field for bits to not match against
  RISC-V: add cpufeature probing for fast-unaligned access
  RISC-V: add strcmp variant using zbb and fast-unaligned access

 arch/riscv/include/asm/alternative-macros.h |  64 ++++----
 arch/riscv/include/asm/alternative.h        |   1 +
 arch/riscv/include/asm/errata_list.h        |  27 ++--
 arch/riscv/kernel/cpufeature.c              |  33 +++-
 arch/riscv/lib/strcmp.S                     | 170 +++++++++++++++++++-
 arch/riscv/lib/strlen.S                     |   2 +-
 arch/riscv/lib/strncmp.S                    |   2 +-
 7 files changed, 245 insertions(+), 54 deletions(-)

-- 
2.35.1


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

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

end of thread, other threads:[~2023-05-11 21:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-13 21:23 [PATCH 0/4] Zbb + fast-unaligned string optimization Heiko Stuebner
2023-01-13 21:23 ` [PATCH 1/4] RISC-V: use bit-values instead of numbers to identify patched cpu-features Heiko Stuebner
2023-01-14 17:54   ` Conor Dooley
2023-01-13 21:23 ` [PATCH 2/4] RISC-V: add alternative-field for bits to not match against Heiko Stuebner
2023-01-14 17:44   ` Conor Dooley
2023-01-17 12:41   ` Andrew Jones
2023-01-13 21:23 ` [PATCH 3/4] RISC-V: add cpufeature probing for fast-unaligned access Heiko Stuebner
2023-01-13 21:23 ` [PATCH 4/4] RISC-V: add strcmp variant using zbb and " Heiko Stuebner
2023-05-11 21:06 ` [PATCH 0/4] Zbb + fast-unaligned string optimization Palmer Dabbelt

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