aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/boot/compressed/string.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-11 19:12:33 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-11 19:12:33 -0800
commitbcede2f64a3b5cb50c0bdec1553ab480fd75d659 (patch)
treeb98e55bf2eea83bb5f6805abb210c5ea8625b550 /arch/x86/boot/compressed/string.c
parentd0b9706c20ebb4ba181dc26e52ac9a6861abf425 (diff)
parent2d2da60fb40a80cc59383121ccf763e0e0e8a42a (diff)
Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, efi: Break up large initrd reads x86, efi: EFI boot stub support efi: Add EFI file I/O data types efi.h: Add boottime->locate_handle search types efi.h: Add graphics protocol guids efi.h: Add allocation types for boottime->allocate_pages() efi.h: Add efi_image_loaded_t efi.h: Add struct definition for boot time services x86: Don't use magic strings for EFI loader signature x86: Add missing bzImage fields to struct setup_header
Diffstat (limited to 'arch/x86/boot/compressed/string.c')
-rw-r--r--arch/x86/boot/compressed/string.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/string.c b/arch/x86/boot/compressed/string.c
index 19b3e693cd72..ffb9c5c9d748 100644
--- a/arch/x86/boot/compressed/string.c
+++ b/arch/x86/boot/compressed/string.c
@@ -1,2 +1,11 @@
#include "misc.h"
+
+int memcmp(const void *s1, const void *s2, size_t len)
+{
+ u8 diff;
+ asm("repe; cmpsb; setnz %0"
+ : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
+ return diff;
+}
+
#include "../string.c"