Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1183013pxb; Tue, 17 Aug 2021 05:57:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqcDpRb2VX1nai2MBPjRdpdnu6fMYZO5wfgy5ed4+p1618XnDrGLZbbh5jFB+MCR0Q1bl8 X-Received: by 2002:a02:1942:: with SMTP id b63mr2820534jab.111.1629205059319; Tue, 17 Aug 2021 05:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629205059; cv=none; d=google.com; s=arc-20160816; b=JE5InOmvhcOJWvFERaxC10PAhVdne0c7K3vuhhg9G5tYYEWpQRvcBQYG3M2wU2kGvH m4O2YO9xc4ajymPbEVNjAHL+3ouHr6UKM8wB2bl6TMJiK4Kojbn4EnFYgjkM+UFhq7JE q03HBb/ziOa6nu/t85zAVa+ajLBMU/y68n2ol3cwFCvQ1WPwejBaUjUzQf1TLNJGFdS+ hQULT8coQ3cIYE1/Fes2/XcIi4qmaUTaQR/oFSPRuZg1bjLff3ybp5l+8/luK22S9D+M fj2oKetZByJ6UJMtxiVyhs8r/p7hjLd3zRPuM+AyWBlMoiOQgj3RKTjKSjghHvYF+Wxb 0sBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=jLsu24uft4z0gIS7iXzPwdzvkMQ/BPsYOZtbGJGNJ7E=; b=hSVGldjB7Lq6/zEGuE6D26FrmTqHpHGTMuxY4NWNJbJtNryW562oMqaqBcLArmXkj9 IIvZPNdlBgbnUBzsnSg4CYpial8JIYh0Yb/Qcs5yPJt3HRjKbBhyRT4b5FnPryBIp7A8 K+BXYtbR97qUcFj7mUaOBDVseL7OfWjfq3hxNPRRAdla17DrIg3mtBQGBYvW4+lkLeKO aF0upLyjwGLpvx/td9gz3XnlzG7QXLKLBfANkF4GgdVpyB+ex0n6seSG0+JRdHgu6w6g A1jrsPtF0tTk55IuXh3p3Wjm1wAl9tRuaN+ERAgVz7dCZYzEfnpaKdv3SI51nHNhGbJh lAqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si2099772ila.78.2021.08.17.05.57.26; Tue, 17 Aug 2021 05:57:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237050AbhHQM4J (ORCPT + 99 others); Tue, 17 Aug 2021 08:56:09 -0400 Received: from mslow1.mail.gandi.net ([217.70.178.240]:35879 "EHLO mslow1.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbhHQM4J (ORCPT ); Tue, 17 Aug 2021 08:56:09 -0400 Received: from relay6-d.mail.gandi.net (unknown [217.70.183.198]) by mslow1.mail.gandi.net (Postfix) with ESMTP id B7F93C06CE; Tue, 17 Aug 2021 12:55:34 +0000 (UTC) Received: (Authenticated sender: ralf@linux-mips.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id EA472C0002; Tue, 17 Aug 2021 12:55:11 +0000 (UTC) Date: Tue, 17 Aug 2021 14:55:09 +0200 From: Ralf Baechle To: Sudip Mukherjee Cc: "Maciej W. Rozycki" , Paul Burton , James Hogan , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: build failure of mips decstation_r4k_defconfig with binutils-2_37 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 17, 2021 at 12:54:32PM +0100, Sudip Mukherjee wrote: > While I was testing v5.4.142-rc2 I noticed mips build of > decstation_r4k_defconfig fails with binutils-2_37. The error is: > > arch/mips/dec/prom/locore.S: Assembler messages: > arch/mips/dec/prom/locore.S:29: Error: opcode not supported on this > processor: r4600 (mips3) `rfe' > > I have also reported this at https://sourceware.org/bugzilla/show_bug.cgi?id=28241 It would appear gas got more anal about ISA checking for the RFE instructions which did only exist in MIPS I and II; MIPS III and later use ERET for returning from an exception. The older gas I've got installed here happily accepts RFE in MIPS III/R4000 mode: $ cat s.s rfe eret $ mips-linux-as -o s.o s.s s.s: Assembler messages: s.s:2: Error: opcode not supported on this processor: mips1 (mips1) `eret' $ mips-linux-as -march=r4000 -o s.o s.s $ mips-linux-objdump -d s.o s.o: file format elf32-tradbigmips Disassembly of section .text: 00000000 <.text>: 0: 42000010 c0 0x10 # <- RFE 4: 42000018 eret ... $ It's easy to find arguments for why this gas change is the right thing to do - and not the right thing to do. It should be fixable by simply putting gas into mips1 mode. Can you test below patch? Ralf Signed-off-by: Ralf Baechle diff --git a/arch/mips/dec/prom/locore.S b/arch/mips/dec/prom/locore.S index 0eb8fab62ab0..8d00ca8872f9 100644 --- a/arch/mips/dec/prom/locore.S +++ b/arch/mips/dec/prom/locore.S @@ -16,6 +16,7 @@ NESTED(genexcept_early, 0, sp) .set noat .set noreorder + .set mips1 mfc0 k0, CP0_STATUS la k1, mem_err