diff options
author | Tom Rini <trini@konsulko.com> | 2021-04-08 07:33:14 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-04-08 07:33:14 -0400 |
commit | f6127db8cc8dec22cf9cd6d6363d812f659ce517 (patch) | |
tree | e302101a2cc971287f1df11f2f9eefd513af621d /arch/riscv/include/asm/string.h | |
parent | 8246654e1ef3ea9e2907a42e01b7747ccc62d412 (diff) | |
parent | e7bb113cc4d03aeb573ff938a1d897d4b3ca99df (diff) |
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
- Watchdog, Unleashed and Icicle improvements
Diffstat (limited to 'arch/riscv/include/asm/string.h')
-rw-r--r-- | arch/riscv/include/asm/string.h | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/arch/riscv/include/asm/string.h b/arch/riscv/include/asm/string.h index 0fc3424a2f..7dee3e4c9f 100644 --- a/arch/riscv/include/asm/string.h +++ b/arch/riscv/include/asm/string.h @@ -19,31 +19,25 @@ #undef __HAVE_ARCH_STRRCHR #undef __HAVE_ARCH_STRCHR -#undef __HAVE_ARCH_MEMCPY -#undef __HAVE_ARCH_MEMMOVE #undef __HAVE_ARCH_MEMCHR #undef __HAVE_ARCH_MEMZERO -#undef __HAVE_ARCH_MEMSET -#ifdef CONFIG_MARCO_MEMSET -#define memset(_p, _v, _n) \ - (typeof(_p) (p) = (_p); \ - typeof(_v) (v) = (_v); \ - typeof(_n) (n) = (_n); \ - { \ - if ((n) != 0) { \ - if (__builtin_constant_p((v)) && (v) == 0) \ - __memzero((p), (n)); \ - else \ - memset((p), (v), (n)); \ - } \ - (p); \ - }) +#undef __HAVE_ARCH_MEMCPY +#if CONFIG_IS_ENABLED(USE_ARCH_MEMCPY) +#define __HAVE_ARCH_MEMCPY +#endif +extern void *memcpy(void *, const void *, __kernel_size_t); + +#undef __HAVE_ARCH_MEMMOVE +#if CONFIG_IS_ENABLED(USE_ARCH_MEMMOVE) +#define __HAVE_ARCH_MEMMOVE +#endif +extern void *memmove(void *, const void *, __kernel_size_t); -#define memzero(_p, _n) \ - (typeof(_p) (p) = (_p); \ - typeof(_n) (n) = (_n); \ - { if ((n) != 0) __memzero((p), (n)); (p); }) +#undef __HAVE_ARCH_MEMZERO +#if CONFIG_IS_ENABLED(USE_ARCH_MEMSET) +#define __HAVE_ARCH_MEMSET #endif +extern void *memset(void *, int, __kernel_size_t); #endif /* __ASM_RISCV_STRING_H */ |