summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/string_64.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-12-10 23:32:10 -0800
committerDavid S. Miller <davem@davemloft.net>2009-12-10 23:32:10 -0800
commit4d14a459857bd151ecbd14bcd37b4628da00792b (patch)
treef713e8292ef84bfcc5ba4f3c7cd19aa4ce908bd5 /arch/sparc/include/asm/string_64.h
parentfb34035e7b4bb3edc7c2dc0683cfe21f57a9574d (diff)
downloadop-kernel-dev-4d14a459857bd151ecbd14bcd37b4628da00792b.zip
op-kernel-dev-4d14a459857bd151ecbd14bcd37b4628da00792b.tar.gz
sparc: Stop trying to be so fancy and use __builtin_{memcpy,memset}()
This mirrors commit ff60fab71bb3b4fdbf8caf57ff3739ffd0887396 (x86: Use __builtin_memset and __builtin_memcpy for memset/memcpy) Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/string_64.h')
-rw-r--r--arch/sparc/include/asm/string_64.h25
1 files changed, 2 insertions, 23 deletions
diff --git a/arch/sparc/include/asm/string_64.h b/arch/sparc/include/asm/string_64.h
index 43161f2..9623bc2 100644
--- a/arch/sparc/include/asm/string_64.h
+++ b/arch/sparc/include/asm/string_64.h
@@ -15,8 +15,6 @@
#include <asm/asi.h>
-extern void *__memset(void *,int,__kernel_size_t);
-
#ifndef EXPORT_SYMTAB_STROPS
/* First the mem*() things. */
@@ -24,29 +22,10 @@ extern void *__memset(void *,int,__kernel_size_t);
extern void *memmove(void *, const void *, __kernel_size_t);
#define __HAVE_ARCH_MEMCPY
-extern void *memcpy(void *, const void *, __kernel_size_t);
+#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
#define __HAVE_ARCH_MEMSET
-extern void *__builtin_memset(void *,int,__kernel_size_t);
-
-static inline void *__constant_memset(void *s, int c, __kernel_size_t count)
-{
- extern __kernel_size_t __bzero(void *, __kernel_size_t);
-
- if (!c) {
- __bzero(s, count);
- return s;
- } else
- return __memset(s, c, count);
-}
-
-#undef memset
-#define memset(s, c, count) \
-((__builtin_constant_p(count) && (count) <= 32) ? \
- __builtin_memset((s), (c), (count)) : \
- (__builtin_constant_p(c) ? \
- __constant_memset((s), (c), (count)) : \
- __memset((s), (c), (count))))
+#define memset(s, c, count) __builtin_memset(s, c, count)
#define __HAVE_ARCH_MEMSCAN
OpenPOWER on IntegriCloud