Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp47228imu; Thu, 8 Nov 2018 14:31:31 -0800 (PST) X-Google-Smtp-Source: AJdET5eIlsuNCJHo59Bmua4tL+fMI5QSFtlwM+4VmdOdAV4PVTHITmay5vhd7kpZQwKTIrgxCZtD X-Received: by 2002:a62:4502:: with SMTP id s2-v6mr2185482pfa.31.1541716291880; Thu, 08 Nov 2018 14:31:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541716291; cv=none; d=google.com; s=arc-20160816; b=XvoDZYhm+X5r68z6k6AAiAH/lylAnEiUF2NUj1lEpSIx4heE/hcYq/vOhD3A7uGpsy TyO69XD96XA0VH8rZB0VktGUdFq/a6X7RiTEKz8A4Sk81jg4mpO2cGvRtjkJvwj84BLK 6y7WP39U5Nsg66JhJSTKGqAVzv+LFwSnWGAhpqeKECahtSE1fvOSK6eViBTUsHmOVK9n HLC2JZl9d4K1g79DMulQRh8UFDTRyKIlZGTUd2uTdEjMp3GU7P/sZdzBRARw+lo/pRvU 5qjPmvO868WRZTfHEpRUW9K2ZPEIPRrp0bxluugzYO+pfYdQnRMLg7xpD3h1aQmgfCmT pwvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xMYUoG1H9gJ/Niz2XiGDLEhsJ04M1eJDefXqYGHHxlg=; b=dLJ5+cMu5hfwQ1Wjw8Xy2E4uSFjlfoyCmm5PzTm9+4yRJxg1CUdKFhbe3D5Psx0Iyx p/82gmW4fsPqsWaulKgw/mznPuNO/SGYup8ulDWhztMlNSyo+3MUEd0cfyESOconFBkx FbEs5/mmD+ChWmpyMfXDruR1NNSolx6EQdSeU3OJDGuLb/b9/ecHQph0oP2zq3ymINtZ 71iF17GfV3LX9OZ9BLhpk+jn3pnLN8hdWiwtDIA/40fs1MmPnLxlXqr0cdfQrLFY3fFU seBnO2hUN4dPoHHMevqrHw/fka1E+G1vraRzE+E2r+L0M161M1WvEIMN4DO5LSV8oZU2 LC8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xT4AQ50X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5-v6si6010665pfb.211.2018.11.08.14.31.16; Thu, 08 Nov 2018 14:31:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xT4AQ50X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730554AbeKIHh7 (ORCPT + 99 others); Fri, 9 Nov 2018 02:37:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:56778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729663AbeKIHh5 (ORCPT ); Fri, 9 Nov 2018 02:37:57 -0500 Received: from localhost (unknown [208.72.13.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 878442147A; Thu, 8 Nov 2018 22:00:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714428; bh=QRLjPJa0EvHzrxld/BIMAmc1YWFl3p577gUNexk+cSk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xT4AQ50Xr8ZTMd0Q9GiYNUiRzgJ3VLNrk/KsinwZMvaTeReMWKbtp2YSya6JGGVv4 ejicuO7Om7MZabRRrnpDmHGLe3OP1ZmpQy92qpS4xTQxI04LPb7ZPzjmkz5fEqE/6Y gb8dzIcc4clxFJjlewtaC7NB01r1cYtjR18ACEg4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Maciej W. Rozycki" , linux-mips@linux-mips.org, Ralf Baechle , Sasha Levin Subject: [PATCH 4.4 083/114] MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression Date: Thu, 8 Nov 2018 13:51:38 -0800 Message-Id: <20181108215108.434680211@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108215059.051093652@linuxfoundation.org> References: <20181108215059.051093652@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 68fe55680d0f3342969f49412fceabb90bdfadba ] 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 Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 4.8+ Patchwork: https://patchwork.linux-mips.org/patch/16893/ Signed-off-by: Ralf Baechle Signed-off-by: Sasha Levin --- arch/mips/dec/int-handler.S | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S index 554d1da97743..21f4a9fe82fa 100644 --- 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 -- 2.17.1