diff options
| author | Tom Rini <[email protected]> | 2017-01-12 13:16:02 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2017-01-20 15:38:01 -0500 |
| commit | 40d5534cff720d566cd52f532f26eea2bd86c1ae (patch) | |
| tree | 14647f1aaaa49a0591c1c13d184cf435caaa323c /arch | |
| parent | a4a35934c7e0475e968e82ded33ef8ad47f10bc7 (diff) | |
ARM: Default to using optimized memset and memcpy routines
We have long had available optimized versions of the memset and memcpy
functions that are borrowed from the Linux kernel. We should use these
in normal conditions as the speed wins in many workflows outweigh the
relatively minor size increase. However, we have a number of places
where we're simply too close to size limits in SPL and must be able to
make the size vs performance trade-off in those cases.
Cc: Philippe Reynes <[email protected]>
Cc: Eric Jarrige <[email protected]>
Cc: Heiko Schocher <[email protected]>
Cc: Magnus Lilja <[email protected]>
Cc: Lokesh Vutla <[email protected]>
Cc: Chander Kashyap <[email protected]>
Cc: Akshay Saraswat <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefan Roese <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
Acked-by: Stefan Roese <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm/Kconfig | 22 | ||||
| -rw-r--r-- | arch/arm/lib/Makefile | 4 |
2 files changed, 22 insertions, 4 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 80038ecb247..855871c64f4 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -128,7 +128,16 @@ config ENABLE_ARM_SOC_BOOT0_HOOK config USE_ARCH_MEMCPY bool "Use an assembly optimized implementation of memcpy" - default y if CPU_V7 + default y + depends on !ARM64 + help + Enable the generation of an optimized version of memcpy. + Such implementation may be faster under some conditions + but may increase the binary size. + +config SPL_USE_ARCH_MEMCPY + bool "Use an assembly optimized implementation of memcpy" + default y if USE_ARCH_MEMCPY depends on !ARM64 help Enable the generation of an optimized version of memcpy. @@ -137,7 +146,16 @@ config USE_ARCH_MEMCPY config USE_ARCH_MEMSET bool "Use an assembly optimized implementation of memset" - default y if CPU_V7 + default y + depends on !ARM64 + help + Enable the generation of an optimized version of memset. + Such implementation may be faster under some conditions + but may increase the binary size. + +config SPL_USE_ARCH_MEMSET + bool "Use an assembly optimized implementation of memset" + default y if USE_ARCH_MEMSET depends on !ARM64 help Enable the generation of an optimized version of memset. diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 024139da25f..166fa9e3dad 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -30,12 +30,12 @@ obj-$(CONFIG_CMD_BOOTI) += bootm.o obj-$(CONFIG_CMD_BOOTM) += bootm.o obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o -obj-$(CONFIG_USE_ARCH_MEMSET) += memset.o -obj-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o else obj-$(CONFIG_SPL_FRAMEWORK) += spl.o obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o endif +obj-$(CONFIG_$(SPL_)USE_ARCH_MEMSET) += memset.o +obj-$(CONFIG_$(SPL_)USE_ARCH_MEMCPY) += memcpy.o obj-$(CONFIG_SEMIHOSTING) += semihosting.o obj-y += sections.o |
