From e4df2d5e852a7d24df3672ae9951eb79e179be08 Mon Sep 17 00:00:00 2001 From: Matteo Croce Date: Wed, 30 Mar 2022 20:07:14 +0800 Subject: 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 Co-developed-by: Guo Ren Signed-off-by: Guo Ren --- arch/csky/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/csky/Kconfig') diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig index 75ef86605d69..21d72b078eef 100644 --- a/arch/csky/Kconfig +++ b/arch/csky/Kconfig @@ -320,6 +320,14 @@ config HOTPLUG_CPU controlled through /sys/devices/system/cpu/cpu1/hotplug/target. Say N if you want to disable CPU hotplug. + +config HAVE_EFFICIENT_UNALIGNED_STRING_OPS + bool "Enable EFFICIENT_UNALIGNED_STRING_OPS for abiv2" + depends on CPU_CK807 || CPU_CK810 || CPU_CK860 + help + Say Y here to enable EFFICIENT_UNALIGNED_STRING_OPS. Some CPU models could + deal with unaligned access by hardware. + endmenu source "arch/csky/Kconfig.platforms" -- cgit v1.2.3