summaryrefslogtreecommitdiff
path: root/arch/csky/lib/Makefile
diff options
context:
space:
mode:
authorMatteo Croce <mcroce@microsoft.com>2022-03-30 15:07:14 +0300
committerGuo Ren <guoren@linux.alibaba.com>2022-04-18 16:23:55 +0300
commite4df2d5e852a7d24df3672ae9951eb79e179be08 (patch)
tree304debe8a13e6d07a56b7f97ac9eb92d8ddd95d7 /arch/csky/lib/Makefile
parentcfb24463a53edeb388f3563e166ad7f9591dad3d (diff)
downloadlinux-e4df2d5e852a7d24df3672ae9951eb79e179be08.tar.xz
csky: Add C based string functions
Try to access RAM with the largest bit width possible, but without doing unaligned accesses. A further improvement could be to use multiple read and writes as the assembly version was trying to do. Tested on a BeagleV Starlight with a SiFive U74 core, where the improvement is noticeable. Signed-off-by: Matteo Croce <mcroce@microsoft.com> Co-developed-by: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Diffstat (limited to 'arch/csky/lib/Makefile')
-rw-r--r--arch/csky/lib/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/csky/lib/Makefile b/arch/csky/lib/Makefile
index 7fbdbb2c4d12..d0ce6e2d7ab2 100644
--- a/arch/csky/lib/Makefile
+++ b/arch/csky/lib/Makefile
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
lib-y := usercopy.o delay.o
obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
+ifneq ($(CONFIG_HAVE_EFFICIENT_UNALIGNED_STRING_OPS), y)
+lib-y += string.o
+endif