]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Aug 2015 20:33:53 +0000 (13:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Aug 2015 20:33:53 +0000 (13:33 -0700)
added patches:
mips-replace-add-and-sub-instructions-in-relocate_kernel.s-with-addiu.patch
mips-unaligned-fix-build-error-on-big-endian-r6-kernels.patch

queue-4.1/mips-replace-add-and-sub-instructions-in-relocate_kernel.s-with-addiu.patch [new file with mode: 0644]
queue-4.1/mips-unaligned-fix-build-error-on-big-endian-r6-kernels.patch [new file with mode: 0644]
queue-4.1/series [new file with mode: 0644]

diff --git a/queue-4.1/mips-replace-add-and-sub-instructions-in-relocate_kernel.s-with-addiu.patch b/queue-4.1/mips-replace-add-and-sub-instructions-in-relocate_kernel.s-with-addiu.patch
new file mode 100644 (file)
index 0000000..30c3857
--- /dev/null
@@ -0,0 +1,55 @@
+From a4504755e7dc8d43ed2a934397032691cd03adf7 Mon Sep 17 00:00:00 2001
+From: James Cowgill <James.Cowgill@imgtec.com>
+Date: Wed, 17 Jun 2015 17:12:50 +0100
+Subject: MIPS: Replace add and sub instructions in relocate_kernel.S with addiu
+
+From: James Cowgill <James.Cowgill@imgtec.com>
+
+commit a4504755e7dc8d43ed2a934397032691cd03adf7 upstream.
+
+Fixes the assembler errors generated when compiling a MIPS R6 kernel with
+CONFIG_KEXEC on, by replacing the offending add and sub instructions with
+addiu instructions.
+
+Build errors:
+arch/mips/kernel/relocate_kernel.S: Assembler messages:
+arch/mips/kernel/relocate_kernel.S:27: Error: invalid operands `dadd $16,$16,8'
+arch/mips/kernel/relocate_kernel.S:64: Error: invalid operands `dadd $20,$20,8'
+arch/mips/kernel/relocate_kernel.S:65: Error: invalid operands `dadd $18,$18,8'
+arch/mips/kernel/relocate_kernel.S:66: Error: invalid operands `dsub $22,$22,1'
+scripts/Makefile.build:294: recipe for target 'arch/mips/kernel/relocate_kernel.o' failed
+
+Signed-off-by: James Cowgill <James.Cowgill@imgtec.com>
+Cc: linux-mips@linux-mips.org
+Patchwork: https://patchwork.linux-mips.org/patch/10558/
+Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/kernel/relocate_kernel.S |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/arch/mips/kernel/relocate_kernel.S
++++ b/arch/mips/kernel/relocate_kernel.S
+@@ -24,7 +24,7 @@ LEAF(relocate_new_kernel)
+ process_entry:
+       PTR_L           s2, (s0)
+-      PTR_ADD         s0, s0, SZREG
++      PTR_ADDIU       s0, s0, SZREG
+       /*
+        * In case of a kdump/crash kernel, the indirection page is not
+@@ -61,9 +61,9 @@ copy_word:
+       /* copy page word by word */
+       REG_L           s5, (s2)
+       REG_S           s5, (s4)
+-      PTR_ADD         s4, s4, SZREG
+-      PTR_ADD         s2, s2, SZREG
+-      LONG_SUB        s6, s6, 1
++      PTR_ADDIU       s4, s4, SZREG
++      PTR_ADDIU       s2, s2, SZREG
++      LONG_ADDIU      s6, s6, -1
+       beq             s6, zero, process_entry
+       b               copy_word
+       b               process_entry
diff --git a/queue-4.1/mips-unaligned-fix-build-error-on-big-endian-r6-kernels.patch b/queue-4.1/mips-unaligned-fix-build-error-on-big-endian-r6-kernels.patch
new file mode 100644 (file)
index 0000000..ab36365
--- /dev/null
@@ -0,0 +1,42 @@
+From 531a6d599f4304156236ebdd531aaa80be61868d Mon Sep 17 00:00:00 2001
+From: James Cowgill <James.Cowgill@imgtec.com>
+Date: Tue, 23 Jun 2015 12:02:00 +0100
+Subject: MIPS: unaligned: Fix build error on big endian R6 kernels
+
+From: James Cowgill <James.Cowgill@imgtec.com>
+
+commit 531a6d599f4304156236ebdd531aaa80be61868d upstream.
+
+Commit eeb538950367 ("MIPS: unaligned: Prevent EVA instructions on kernel
+unaligned accesses") renamed the Load* and Store* defines in unaligned.c
+to _Load* and _Store* as part of its fix. One define was missed out which
+causes big endian R6 kernels to fail to build.
+
+arch/mips/kernel/unaligned.c:880:35:
+error: implicit declaration of function '_StoreDW'
+ #define StoreDW(addr, value, res) _StoreDW(addr, value, res)
+                                   ^
+
+Signed-off-by: James Cowgill <James.Cowgill@imgtec.com>
+Fixes: eeb538950367 ("MIPS: unaligned: Prevent EVA instructions on kernel unaligned accesses")
+Cc: Markos Chandras <markos.chandras@imgtec.com>
+Cc: linux-mips@linux-mips.org
+Patchwork: https://patchwork.linux-mips.org/patch/10575/
+Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/kernel/unaligned.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/mips/kernel/unaligned.c
++++ b/arch/mips/kernel/unaligned.c
+@@ -438,7 +438,7 @@ do {
+               : "memory");                                \
+ } while(0)
+-#define     StoreDW(addr, value, res) \
++#define     _StoreDW(addr, value, res) \
+ do {                                                        \
+               __asm__ __volatile__ (                      \
+                       ".set\tpush\n\t"                    \
diff --git a/queue-4.1/series b/queue-4.1/series
new file mode 100644 (file)
index 0000000..947288b
--- /dev/null
@@ -0,0 +1,2 @@
+mips-unaligned-fix-build-error-on-big-endian-r6-kernels.patch
+mips-replace-add-and-sub-instructions-in-relocate_kernel.s-with-addiu.patch