From: Greg Kroah-Hartman Date: Mon, 10 Aug 2015 20:33:53 +0000 (-0700) Subject: 4.1-stable patches X-Git-Tag: v3.10.87~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=65d8ecad3e8ccf8f077492994a550c47dd56dfa9;p=thirdparty%2Fkernel%2Fstable-queue.git 4.1-stable patches 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 --- 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 index 00000000000..30c38574f32 --- /dev/null +++ b/queue-4.1/mips-replace-add-and-sub-instructions-in-relocate_kernel.s-with-addiu.patch @@ -0,0 +1,55 @@ +From a4504755e7dc8d43ed2a934397032691cd03adf7 Mon Sep 17 00:00:00 2001 +From: James Cowgill +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 + +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 +Cc: linux-mips@linux-mips.org +Patchwork: https://patchwork.linux-mips.org/patch/10558/ +Signed-off-by: Ralf Baechle +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..ab363657b5a --- /dev/null +++ b/queue-4.1/mips-unaligned-fix-build-error-on-big-endian-r6-kernels.patch @@ -0,0 +1,42 @@ +From 531a6d599f4304156236ebdd531aaa80be61868d Mon Sep 17 00:00:00 2001 +From: James Cowgill +Date: Tue, 23 Jun 2015 12:02:00 +0100 +Subject: MIPS: unaligned: Fix build error on big endian R6 kernels + +From: James Cowgill + +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 +Fixes: eeb538950367 ("MIPS: unaligned: Prevent EVA instructions on kernel unaligned accesses") +Cc: Markos Chandras +Cc: linux-mips@linux-mips.org +Patchwork: https://patchwork.linux-mips.org/patch/10575/ +Signed-off-by: Ralf Baechle +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..947288b5a96 --- /dev/null +++ b/queue-4.1/series @@ -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