riscv: optimized memset
authorMatteo Croce <technoboy85@gmail.com>
Wed, 29 Sep 2021 17:22:34 +0000 (19:22 +0200)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Thu, 9 Feb 2023 18:32:37 +0000 (19:32 +0100)
commit2a8b65c63734644f67b79c0b85626494f24db74b
tree4ef00758e11b4542a265b3f394d81c3a721f7b5e
parent79379298f248fefa609041bd97f30274257c2a39
riscv: optimized memset

The generic memset is defined as a byte at time write. This is always
safe, but it's slower than a 4 byte or even 8 byte write.

Write a generic memset which fills the data one byte at time until the
destination is aligned, then fills using the largest size allowed,
and finally fills the remaining data one byte at time.

Signed-off-by: Matteo Croce <mcroce@microsoft.com>
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
arch/riscv/include/asm/string.h
arch/riscv/kernel/Makefile
arch/riscv/kernel/riscv_ksyms.c [deleted file]
arch/riscv/lib/Makefile
arch/riscv/lib/memset.S [deleted file]
arch/riscv/lib/string.c
arch/riscv/purgatory/Makefile