From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eddie.linux-mips.org ([148.251.95.138]:43546 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751883AbdGIH7q (ORCPT ); Sun, 9 Jul 2017 03:59:46 -0400 Received: from localhost.localdomain ([127.0.0.1]:35846 "EHLO localhost.localdomain" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23990924AbdGIH7jaOFNA (ORCPT ); Sun, 9 Jul 2017 09:59:39 +0200 Date: Sun, 9 Jul 2017 08:59:39 +0100 (BST) From: "Maciej W. Rozycki" To: Ralf Baechle cc: linux-mips@linux-mips.org, stable@vger.kernel.org Subject: [PATCH] MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: stable-owner@vger.kernel.org List-ID: 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 --- 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