aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-02-09 12:10:46 +0000
committerJohn Crispin <blogic@openwrt.org>2015-02-09 12:10:46 +0000
commit4d12e544b81ba15197717a4c93098d30068e408e (patch)
treeb0ba1f634e38d145934225e2e5d316653f354312
parent247ab2bfb334feec30504ca3d2d6037e4876da55 (diff)
downloadmaster-187ad058-4d12e544b81ba15197717a4c93098d30068e408e.tar.gz
master-187ad058-4d12e544b81ba15197717a4c93098d30068e408e.tar.bz2
master-187ad058-4d12e544b81ba15197717a4c93098d30068e408e.zip
kernel: copy mips_decompressor_memmove patch to 3.18/3.19
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44339 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/generic/patches-3.18/060-mips_decompressor_memmove.patch22
-rw-r--r--target/linux/generic/patches-3.19/060-mips_decompressor_memmove.patch22
2 files changed, 44 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.18/060-mips_decompressor_memmove.patch b/target/linux/generic/patches-3.18/060-mips_decompressor_memmove.patch
new file mode 100644
index 0000000000..d215b80ab2
--- /dev/null
+++ b/target/linux/generic/patches-3.18/060-mips_decompressor_memmove.patch
@@ -0,0 +1,22 @@
+--- a/arch/mips/boot/compressed/string.c
++++ b/arch/mips/boot/compressed/string.c
+@@ -26,3 +26,19 @@ void *memset(void *s, int c, size_t n)
+ ss[i] = c;
+ return s;
+ }
++
++void *memmove(void *__dest, __const void *__src, size_t count)
++{
++ unsigned char *d = __dest;
++ const unsigned char *s = __src;
++
++ if (__dest == __src)
++ return __dest;
++
++ if (__dest < __src)
++ return memcpy(__dest, __src, count);
++
++ while (count--)
++ d[count] = s[count];
++ return __dest;
++}
diff --git a/target/linux/generic/patches-3.19/060-mips_decompressor_memmove.patch b/target/linux/generic/patches-3.19/060-mips_decompressor_memmove.patch
new file mode 100644
index 0000000000..d215b80ab2
--- /dev/null
+++ b/target/linux/generic/patches-3.19/060-mips_decompressor_memmove.patch
@@ -0,0 +1,22 @@
+--- a/arch/mips/boot/compressed/string.c
++++ b/arch/mips/boot/compressed/string.c
+@@ -26,3 +26,19 @@ void *memset(void *s, int c, size_t n)
+ ss[i] = c;
+ return s;
+ }
++
++void *memmove(void *__dest, __const void *__src, size_t count)
++{
++ unsigned char *d = __dest;
++ const unsigned char *s = __src;
++
++ if (__dest == __src)
++ return __dest;
++
++ if (__dest < __src)
++ return memcpy(__dest, __src, count);
++
++ while (count--)
++ d[count] = s[count];
++ return __dest;
++}