summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/boot.h
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2014-03-18 15:26:37 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2014-03-19 15:43:45 -0700
commitc041b5ad8640dd89ccf1411cd2636ef7c1cfee92 (patch)
tree43a8092f7ce876ee2b3f9d076b2d160f0f3e1fd5 /arch/x86/boot/boot.h
parentaad830938ed8ba175d8060751654f78d4115ea0a (diff)
downloadlinux-stable-c041b5ad8640dd89ccf1411cd2636ef7c1cfee92.tar.gz
linux-stable-c041b5ad8640dd89ccf1411cd2636ef7c1cfee92.tar.bz2
linux-stable-c041b5ad8640dd89ccf1411cd2636ef7c1cfee92.zip
x86, boot: Create a separate string.h file to provide standard string functions
Create a separate arch/x86/boot/string.h file to provide declaration of some of the common string functions. By default memcpy, memset and memcmp functions will default to gcc builtin functions. If code wants to use an optimized version of any of these functions, they need to #undef the respective macro and link against a local file providing definition of undefed function. For example, arch/x86/boot/* code links against copy.S to get memcpy() and memcmp() definitions. arch/86/boot/compressed/* links against compressed/string.c. There are quite a few places in arch/x86/ where these functions are used. Idea is to try to consilidate their declaration and possibly definitions so that it can be reused. I am planning to reuse boot/string.h in arch/x86/purgatory/ and use gcc builtin functions for memcpy, memset and memcmp. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Link: http://lkml.kernel.org/r/1395170800-11059-3-git-send-email-vgoyal@redhat.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/boot/boot.h')
-rw-r--r--arch/x86/boot/boot.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
index 50f8c5e0f37e..bed9665cc7e0 100644
--- a/arch/x86/boot/boot.h
+++ b/arch/x86/boot/boot.h
@@ -228,11 +228,6 @@ void copy_to_fs(addr_t dst, void *src, size_t len);
void *copy_from_fs(void *dst, addr_t src, size_t len);
void copy_to_gs(addr_t dst, void *src, size_t len);
void *copy_from_gs(void *dst, addr_t src, size_t len);
-void *memcpy(void *dst, void *src, size_t len);
-void *memset(void *dst, int c, size_t len);
-
-#define memcpy(d,s,l) __builtin_memcpy(d,s,l)
-#define memset(d,c,l) __builtin_memset(d,c,l)
/* a20.c */
int enable_a20(void);