xref: /openbmc/linux/arch/arm/include/asm/string.h (revision e3d786a3)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_ARM_STRING_H
3 #define __ASM_ARM_STRING_H
4 
5 /*
6  * We don't do inline string functions, since the
7  * optimised inline asm versions are not small.
8  */
9 
10 #define __HAVE_ARCH_STRRCHR
11 extern char * strrchr(const char * s, int c);
12 
13 #define __HAVE_ARCH_STRCHR
14 extern char * strchr(const char * s, int c);
15 
16 #define __HAVE_ARCH_MEMCPY
17 extern void * memcpy(void *, const void *, __kernel_size_t);
18 
19 #define __HAVE_ARCH_MEMMOVE
20 extern void * memmove(void *, const void *, __kernel_size_t);
21 
22 #define __HAVE_ARCH_MEMCHR
23 extern void * memchr(const void *, int, __kernel_size_t);
24 
25 #define __HAVE_ARCH_MEMSET
26 extern void * memset(void *, int, __kernel_size_t);
27 
28 #define __HAVE_ARCH_MEMSET32
29 extern void *__memset32(uint32_t *, uint32_t v, __kernel_size_t);
30 static inline void *memset32(uint32_t *p, uint32_t v, __kernel_size_t n)
31 {
32 	return __memset32(p, v, n * 4);
33 }
34 
35 #define __HAVE_ARCH_MEMSET64
36 extern void *__memset64(uint64_t *, uint32_t low, __kernel_size_t, uint32_t hi);
37 static inline void *memset64(uint64_t *p, uint64_t v, __kernel_size_t n)
38 {
39 	return __memset64(p, v, n * 8, v >> 32);
40 }
41 
42 #endif
43