Received: by 10.223.185.116 with SMTP id b49csp1016794wrg; Wed, 21 Feb 2018 10:37:28 -0800 (PST) X-Google-Smtp-Source: AH8x225S72PXbf0uLgMwYihHBROqWoNmMVCIn9HFhq8weOJcXuSlBdmgas2nliAJ2iKocksln6vK X-Received: by 10.99.114.77 with SMTP id c13mr3436024pgn.286.1519238248449; Wed, 21 Feb 2018 10:37:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519238248; cv=none; d=google.com; s=arc-20160816; b=DV/KnWv1m0vRgHq1iEyRcLW6uWaWunmJTr/Yzvl2UezdN99V54AQbzzNPEB/tiUE1q /qvrvsWJQriw5ZjHARN/yNQXinB4RubLhU/3+57TdXo1JijBBC9Z7/2oFfnY7bJoqYE6 48UH6TYOmuonhpJZWOmz4tTYpc6kUBmXsjx9AxC8U+Rj2cz9v3dQyXKNLgarw5SJPjn+ aY5a4LFFuG4qRC/qFrMh8KgPxrkdx6YCQj8Gta/gm2LLgMdxeYvXSLlD9WaGVqxCPXMY 28pITpkX89xd4Eiyss3/UpxbSj5/Ek2P7IfZGup6a5yYc4KusZS4w8d7XLdG9K4sh7M8 OFWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ZoKpDkj7ggsrolOIKx9hKHEKjecpedhXlg0DNcvelwQ=; b=ovxuA/xZ9Oqt8MtVrCfex3PjIZbIwuqi7CbXrUsNNQeWmifjXgsTJhdUWyNRjMB+WZ Y2X8o8pkP6C8+UvJqsK4QNsam82B4BEnuyFtHxP5Llqa6P4nNktvLO4KSZE9ak20Bb1G p2T3MWhFbsdnMw7I7fSrWBz8DVNSUHLi4MHDDRksiepVJySIP97AHmY+H93bBM3D878e 9WWIMsRjSLqQrTsxyiDzh83a0BtT/usLBcb74qvn3/ZzvO1E8eHZt3/k5z3a0L7bJEjf 0ScmlKwlQxLSq6aNZoXDmx/+zSVfjYiJe1l6W37gl1+MVGARahDO7XtaOShVzy74Xe1b Xm4A== ARC-Authentication-Results: i=1; mx.google.com; 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 j15si155402pgt.354.2018.02.21.10.37.14; Wed, 21 Feb 2018 10:37:28 -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; 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 S936359AbeBUNLT (ORCPT + 99 others); Wed, 21 Feb 2018 08:11:19 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44496 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936293AbeBUNLK (ORCPT ); Wed, 21 Feb 2018 08:11:10 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 32B7B121D; Wed, 21 Feb 2018 13:10:45 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Greg Ungerer , James Hogan , Ralf Baechle , Paul Burton , linux-mips@linux-mips.org Subject: [PATCH 4.15 113/163] MIPS: CPS: Fix MIPS_ISA_LEVEL_RAW fallout Date: Wed, 21 Feb 2018 13:49:02 +0100 Message-Id: <20180221124536.407722932@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: James Hogan commit 8dbc1864b74f5dea5a3f7c30ca8fd358a675132f upstream. Commit 17278a91e04f ("MIPS: CPS: Fix r1 .set mt assembler warning") added .set MIPS_ISA_LEVEL_RAW to silence warnings about .set mt on r1, however this can result in a MOVE being encoded as a 64-bit DADDU instruction on certain version of binutils (e.g. 2.22), and reserved instruction exceptions at runtime on 32-bit hardware. Reduce the sizes of the push/pop sections to include only instructions that are part of the MT ASE or which won't convert to 64-bit instructions after .set mips64r2/mips64r6. Reported-by: Greg Ungerer Fixes: 17278a91e04f ("MIPS: CPS: Fix r1 .set mt assembler warning") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: # 4.15 Tested-by: Greg Ungerer Patchwork: https://patchwork.linux-mips.org/patch/18578/ Signed-off-by: Greg Kroah-Hartman --- arch/mips/kernel/cps-vec.S | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) --- a/arch/mips/kernel/cps-vec.S +++ b/arch/mips/kernel/cps-vec.S @@ -388,15 +388,16 @@ LEAF(mips_cps_boot_vpes) #elif defined(CONFIG_MIPS_MT) - .set push - .set MIPS_ISA_LEVEL_RAW - .set mt - /* If the core doesn't support MT then return */ has_mt t0, 5f /* Enter VPE configuration state */ + .set push + .set MIPS_ISA_LEVEL_RAW + .set mt dvpe + .set pop + PTR_LA t1, 1f jr.hb t1 nop @@ -422,6 +423,10 @@ LEAF(mips_cps_boot_vpes) mtc0 t0, CP0_VPECONTROL ehb + .set push + .set MIPS_ISA_LEVEL_RAW + .set mt + /* Skip the VPE if its TC is not halted */ mftc0 t0, CP0_TCHALT beqz t0, 2f @@ -495,6 +500,8 @@ LEAF(mips_cps_boot_vpes) ehb evpe + .set pop + /* Check whether this VPE is meant to be running */ li t0, 1 sll t0, t0, a1 @@ -509,7 +516,7 @@ LEAF(mips_cps_boot_vpes) 1: jr.hb t0 nop -2: .set pop +2: #endif /* CONFIG_MIPS_MT_SMP */