diff options
author | David S. Miller <davem@davemloft.net> | 2009-12-11 10:32:10 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-11 10:32:10 +0300 |
commit | 4d14a459857bd151ecbd14bcd37b4628da00792b (patch) | |
tree | f713e8292ef84bfcc5ba4f3c7cd19aa4ce908bd5 /arch/sparc/include/asm/string_64.h | |
parent | fb34035e7b4bb3edc7c2dc0683cfe21f57a9574d (diff) | |
download | linux-4d14a459857bd151ecbd14bcd37b4628da00792b.tar.xz |
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.h | 25 |
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 43161f2d17eb..9623bc213158 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 |