diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-01-27 01:05:20 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-01-27 01:05:20 +0000 |
commit | 546db14ee74118296f425f3b91634fb767d67290 (patch) | |
tree | 22b613a3da8d4bf663eec5e155af01b87fdf9094 /include/asm-arm/string.h | |
parent | 1e25e41c4f5474e14452094492dbc169b800e4c8 (diff) |
Merge with Linux 2.3.23. The new bootmem stuff has broken various
platforms. At this time I've only verified that IP22 support compiles
and IP27 actually works.
Diffstat (limited to 'include/asm-arm/string.h')
-rw-r--r-- | include/asm-arm/string.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/include/asm-arm/string.h b/include/asm-arm/string.h index 9c72b0173..5d631341e 100644 --- a/include/asm-arm/string.h +++ b/include/asm-arm/string.h @@ -2,7 +2,8 @@ #define __ASM_ARM_STRING_H /* - * inline versions, hmm... + * We don't do inline string functions, since the + * optimised inline asm versions are not small. */ #define __HAVE_ARCH_STRRCHR @@ -13,13 +14,25 @@ extern char * strchr(const char * s, int c); #define __HAVE_ARCH_MEMCPY #define __HAVE_ARCH_MEMMOVE -#define __HAVE_ARCH_MEMSET #define __HAVE_ARCH_MEMCHR - #define __HAVE_ARCH_MEMZERO -extern void memzero(void *ptr, int n); +#define __HAVE_ARCH_MEMSET + +extern void __memzero(void *ptr, __kernel_size_t n); +extern void __memset(void *ptr, int v, __kernel_size_t n); + +#define memset(p,v,n) \ + ({ \ + if ((n) != 0) { \ + if (__builtin_constant_p((v)) && (v) == 0) \ + __memzero((p),(n)); \ + else \ + __memset((p),(v),(n)); \ + } \ + (p); \ + }) -extern void memsetl (unsigned long *, unsigned long, int n); +#define memzero(p,n) ({ if ((n) != 0) __memzero((p),(n)); (p); }) #endif |