* [PATCH] MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression
@ 2017-07-09 7:59 Maciej W. Rozycki
2017-07-18 11:44 ` Maciej W. Rozycki
0 siblings, 1 reply; 2+ messages in thread
From: Maciej W. Rozycki @ 2017-07-09 7:59 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, stable
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. Use ADDIU instead then,
which is equivalent when used with LUI to compose the intermediate
32-bit values.
Cc: stable@vger.kernel.org # 4.8+
Fixes: 3021773c7c3e ("MIPS: DEC: Avoid la pseudo-instruction in delay slots")
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
---
arch/mips/dec/int-handler.S | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
linux-mips-dec-int-handler-dla.diff
Index: linux-sfr-4maxp64/arch/mips/dec/int-handler.S
===================================================================
--- linux-sfr-4maxp64.orig/arch/mips/dec/int-handler.S
+++ linux-sfr-4maxp64/arch/mips/dec/int-handler.S
@@ -159,8 +159,8 @@
.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)
+ addiu t1, t1, %higher(cpu_mask_nr_tbl)
+ addiu AT, AT, %lo(cpu_mask_nr_tbl)
dsll t1, 32
daddu t1, t1, AT
.set pop
@@ -226,8 +226,8 @@
.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)
+ addiu t1, t1, %higher(asic_mask_nr_tbl)
+ addiu AT, AT, %lo(asic_mask_nr_tbl)
dsll t1, 32
daddu t1, t1, AT
.set pop
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression
2017-07-09 7:59 [PATCH] MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression Maciej W. Rozycki
@ 2017-07-18 11:44 ` Maciej W. Rozycki
0 siblings, 0 replies; 2+ messages in thread
From: Maciej W. Rozycki @ 2017-07-18 11:44 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, stable
On Sun, 9 Jul 2017, Maciej W. Rozycki wrote:
> 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. Use ADDIU instead then,
> which is equivalent when used with LUI to compose the intermediate
> 32-bit values.
64-bit DEC configurations unconditionally select CPU_DADDI_WORKAROUNDS,
which in turn requires KBUILD_SYM32 or a build error is triggered in our
top-level arch Makefile. Therefore this issue can be handled better, by
checking for KBUILD_64BIT_SYM32 and then the problematic 64-bit leg of
the #ifdef can be reduced to #error, as not supposed to be ever enabled.
Withdrawing this patch then, I'll send a different one soon.
Maciej
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-18 11:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-09 7:59 [PATCH] MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression Maciej W. Rozycki
2017-07-18 11:44 ` Maciej W. Rozycki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.