Commit de577a35 authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt

powerpc: Use generic memcpy code in little endian

We need to fix some endian issues in our memcpy code. For now
just enable the generic memcpy routine for little endian builds.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 7a332b0c
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
#define __HAVE_ARCH_STRNCMP #define __HAVE_ARCH_STRNCMP
#define __HAVE_ARCH_STRCAT #define __HAVE_ARCH_STRCAT
#define __HAVE_ARCH_MEMSET #define __HAVE_ARCH_MEMSET
#ifdef __BIG_ENDIAN__
#define __HAVE_ARCH_MEMCPY #define __HAVE_ARCH_MEMCPY
#endif
#define __HAVE_ARCH_MEMMOVE #define __HAVE_ARCH_MEMMOVE
#define __HAVE_ARCH_MEMCMP #define __HAVE_ARCH_MEMCMP
#define __HAVE_ARCH_MEMCHR #define __HAVE_ARCH_MEMCHR
...@@ -22,7 +24,9 @@ extern int strcmp(const char *,const char *); ...@@ -22,7 +24,9 @@ extern int strcmp(const char *,const char *);
extern int strncmp(const char *, const char *, __kernel_size_t); extern int strncmp(const char *, const char *, __kernel_size_t);
extern char * strcat(char *, const char *); extern char * strcat(char *, const char *);
extern void * memset(void *,int,__kernel_size_t); extern void * memset(void *,int,__kernel_size_t);
#ifdef __BIG_ENDIAN__
extern void * memcpy(void *,const void *,__kernel_size_t); extern void * memcpy(void *,const void *,__kernel_size_t);
#endif
extern void * memmove(void *,const void *,__kernel_size_t); extern void * memmove(void *,const void *,__kernel_size_t);
extern int memcmp(const void *,const void *,__kernel_size_t); extern int memcmp(const void *,const void *,__kernel_size_t);
extern void * memchr(const void *,int,__kernel_size_t); extern void * memchr(const void *,int,__kernel_size_t);
......
...@@ -148,7 +148,9 @@ EXPORT_SYMBOL(__ucmpdi2); ...@@ -148,7 +148,9 @@ EXPORT_SYMBOL(__ucmpdi2);
#endif #endif
long long __bswapdi2(long long); long long __bswapdi2(long long);
EXPORT_SYMBOL(__bswapdi2); EXPORT_SYMBOL(__bswapdi2);
#ifdef __BIG_ENDIAN__
EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memcpy);
#endif
EXPORT_SYMBOL(memset); EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memmove); EXPORT_SYMBOL(memmove);
EXPORT_SYMBOL(memcmp); EXPORT_SYMBOL(memcmp);
......
...@@ -15,15 +15,18 @@ obj-$(CONFIG_PPC32) += div64.o copy_32.o ...@@ -15,15 +15,18 @@ obj-$(CONFIG_PPC32) += div64.o copy_32.o
obj-$(CONFIG_HAS_IOMEM) += devres.o obj-$(CONFIG_HAS_IOMEM) += devres.o
obj-$(CONFIG_PPC64) += copypage_64.o copyuser_64.o \ obj-$(CONFIG_PPC64) += copypage_64.o copyuser_64.o \
memcpy_64.o usercopy_64.o mem_64.o string.o \ usercopy_64.o mem_64.o string.o \
hweight_64.o \ hweight_64.o \
copyuser_power7.o string_64.o copypage_power7.o \ copyuser_power7.o string_64.o copypage_power7.o
memcpy_power7.o
ifeq ($(CONFIG_GENERIC_CSUM),) ifeq ($(CONFIG_GENERIC_CSUM),)
obj-y += checksum_$(CONFIG_WORD_SIZE).o obj-y += checksum_$(CONFIG_WORD_SIZE).o
obj-$(CONFIG_PPC64) += checksum_wrappers_64.o obj-$(CONFIG_PPC64) += checksum_wrappers_64.o
endif endif
ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),)
obj-$(CONFIG_PPC64) += memcpy_power7.o memcpy_64.o
endif
obj-$(CONFIG_PPC_EMULATE_SSTEP) += sstep.o ldstfp.o obj-$(CONFIG_PPC_EMULATE_SSTEP) += sstep.o ldstfp.o
ifeq ($(CONFIG_PPC64),y) ifeq ($(CONFIG_PPC64),y)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment