]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Aug 2017 00:39:21 +0000 (17:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Aug 2017 00:39:21 +0000 (17:39 -0700)
added patches:
mips-dec-fix-an-int-handler.s-cpu_daddi_workarounds-regression.patch

queue-4.9/mips-dec-fix-an-int-handler.s-cpu_daddi_workarounds-regression.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/mips-dec-fix-an-int-handler.s-cpu_daddi_workarounds-regression.patch b/queue-4.9/mips-dec-fix-an-int-handler.s-cpu_daddi_workarounds-regression.patch
new file mode 100644 (file)
index 0000000..0b0f942
--- /dev/null
@@ -0,0 +1,95 @@
+From 68fe55680d0f3342969f49412fceabb90bdfadba Mon Sep 17 00:00:00 2001
+From: "Maciej W. Rozycki" <macro@linux-mips.org>
+Date: Sun, 30 Jul 2017 21:28:15 +0100
+Subject: MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression
+
+From: Maciej W. Rozycki <macro@linux-mips.org>
+
+commit 68fe55680d0f3342969f49412fceabb90bdfadba upstream.
+
+Fix a commit 3021773c7c3e ("MIPS: DEC: Avoid la pseudo-instruction in
+delay slots") regression and remove assembly errors:
+
+arch/mips/dec/int-handler.S: Assembler messages:
+arch/mips/dec/int-handler.S:162: Error: Macro used $at after ".set noat"
+arch/mips/dec/int-handler.S:163: Error: Macro used $at after ".set noat"
+arch/mips/dec/int-handler.S:229: Error: Macro used $at after ".set noat"
+arch/mips/dec/int-handler.S:230: Error: Macro used $at after ".set noat"
+
+triggering with with the CPU_DADDI_WORKAROUNDS option set and the DADDIU
+instruction.  This is because with that option in place the instruction
+becomes a macro, which expands to an LI/DADDU (or actually ADDIU/DADDU)
+sequence that uses $at as a temporary register.
+
+With CPU_DADDI_WORKAROUNDS we only support `-msym32' compilation though,
+and this is already enforced in arch/mips/Makefile, so choose the 32-bit
+expansion variant for the supported configurations and then replace the
+64-bit variant with #error just in case.
+
+Fixes: 3021773c7c3e ("MIPS: DEC: Avoid la pseudo-instruction in delay slots")
+Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
+Cc: linux-mips@linux-mips.org
+Patchwork: https://patchwork.linux-mips.org/patch/16893/
+Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/dec/int-handler.S |   34 ++++++----------------------------
+ 1 file changed, 6 insertions(+), 28 deletions(-)
+
+--- a/arch/mips/dec/int-handler.S
++++ b/arch/mips/dec/int-handler.S
+@@ -147,23 +147,12 @@
+                * Find irq with highest priority
+                */
+               # open coded PTR_LA t1, cpu_mask_nr_tbl
+-#if (_MIPS_SZPTR == 32)
++#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
+               # open coded la t1, cpu_mask_nr_tbl
+               lui     t1, %hi(cpu_mask_nr_tbl)
+               addiu   t1, %lo(cpu_mask_nr_tbl)
+-
+-#endif
+-#if (_MIPS_SZPTR == 64)
+-              # open coded dla t1, cpu_mask_nr_tbl
+-              .set    push
+-              .set    noat
+-              lui     t1, %highest(cpu_mask_nr_tbl)
+-              lui     AT, %hi(cpu_mask_nr_tbl)
+-              daddiu  t1, t1, %higher(cpu_mask_nr_tbl)
+-              daddiu  AT, AT, %lo(cpu_mask_nr_tbl)
+-              dsll    t1, 32
+-              daddu   t1, t1, AT
+-              .set    pop
++#else
++#error GCC `-msym32' option required for 64-bit DECstation builds
+ #endif
+ 1:            lw      t2,(t1)
+               nop
+@@ -214,23 +203,12 @@
+                * Find irq with highest priority
+                */
+               # open coded PTR_LA t1,asic_mask_nr_tbl
+-#if (_MIPS_SZPTR == 32)
++#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
+               # open coded la t1, asic_mask_nr_tbl
+               lui     t1, %hi(asic_mask_nr_tbl)
+               addiu   t1, %lo(asic_mask_nr_tbl)
+-
+-#endif
+-#if (_MIPS_SZPTR == 64)
+-              # open coded dla t1, asic_mask_nr_tbl
+-              .set    push
+-              .set    noat
+-              lui     t1, %highest(asic_mask_nr_tbl)
+-              lui     AT, %hi(asic_mask_nr_tbl)
+-              daddiu  t1, t1, %higher(asic_mask_nr_tbl)
+-              daddiu  AT, AT, %lo(asic_mask_nr_tbl)
+-              dsll    t1, 32
+-              daddu   t1, t1, AT
+-              .set    pop
++#else
++#error GCC `-msym32' option required for 64-bit DECstation builds
+ #endif
+ 2:            lw      t2,(t1)
+               nop
index 39e47764b9b9a9657c4eb7ba1f5e156b1c3e5bb8..7b9b342b18d8e3537b1dc9da87e3ff81e0e8545d 100644 (file)
@@ -38,3 +38,4 @@ pinctrl-uniphier-fix-warn_on-of-pingroups-dump-on-ld11.patch
 pinctrl-uniphier-fix-warn_on-of-pingroups-dump-on-ld20.patch
 pinctrl-samsung-remove-bogus-irq_mask-from-resource-management.patch
 pinctrl-meson-gxbb-add-missing-gpiodv_18-pin-entry.patch
+mips-dec-fix-an-int-handler.s-cpu_daddi_workarounds-regression.patch