stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, stable@vger.kernel.org
Subject: [PATCH] MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression
Date: Sun, 9 Jul 2017 08:59:39 +0100 (BST)	[thread overview]
Message-ID: <alpine.LFD.2.20.1707090226390.5208@eddie.linux-mips.org> (raw)

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

             reply	other threads:[~2017-07-09  7:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-09  7:59 Maciej W. Rozycki [this message]
2017-07-18 11:44 ` [PATCH] MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.20.1707090226390.5208@eddie.linux-mips.org \
    --to=macro@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).