From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C87939E6EB; Thu, 17 Sep 2026 17:53:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789667615; cv=none; b=PVxiBRpRbEGlpLhdVHE0Z6NwAG9Oz3Ow+/G52kFv9FghXpKmmfBZJAmrJ5JR4ggeWQuGkJUbNJoT4rdXq50rFAqvCbt/GiFZ0JWebw1ZmM5AreUri3yXNabyJ5iK/1iquzoFGuKCoF4Eu7Q58jtelJosRhdDleU1adpnYhPS5GU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789667615; c=relaxed/simple; bh=aN6+9qlui3ZE5pwD7hUKLcXkqQNO/MvfFDGX6yXBlnw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bRLyuJY1DAXq1H2RNH1ypOQx5v+39q95wCrf27unTiKnObGcuKzRR21NlS3PSIz0nH7J6h7SFk0J1o3++XzBSg0o6EVDynfwPPw3coea3PtiEySW/ffeuzEN7GLz6HHPgkEpyzE6gOB79f60ms7o/7Sd0+2D3cVrgHho0ZCJf9k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oNAq4bg0; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="oNAq4bg0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0AA91F000FF; Thu, 17 Sep 2026 17:53:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789667613; bh=W3hc2sva8L/Ibs7UVOKa6VE/ja+rk1ukKVDXQwj1968=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=oNAq4bg08hKeGNk/Wb2TmJXcJGMt6Gy1ClIWvoeeHk2TuQvqSmFHWheXpv6IQuw5t d+nHLa3CBrtNFD69gOz1vzGZmyLSHSryyLchxjk5eGLw8aquZcEump2UubWrt8xw0T +z5Mc5KVhkMxuwNs6G24G2w4gLwRZ/85qKeQ564I= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Rosen Penev , "Maciej W. Rozycki" , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 6.12 0151/1102] mips: cps: Assemble jr.hb with an R2 ISA level Date: Thu, 17 Sep 2026 16:01:34 +0100 Message-ID: <20260917151543.319824587@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260917151539.408551884@linuxfoundation.org> References: <20260917151539.408551884@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rosen Penev [ Upstream commit e5d64f868e484da06f5c141c18c32c01c269625e ] A MIPS allmodconfig built with LLVM can select CPU_MIPS32_R1 together with MIPS_MT_SMP. In that configuration clang invokes the integrated assembler with -march=mips32, and the MIPS MT path in cps-vec.S fails to assemble two jr.hb instructions: arch/mips/kernel/cps-vec.S:376:2: error: instruction requires a CPU feature not currently enabled arch/mips/kernel/cps-vec.S:490:4: error: instruction requires a CPU feature not currently enabled The earlier jr.hb in the same file is already assembled inside a .set MIPS_ISA_LEVEL_RAW scope. The two failing sites are reached after popping back to the file's base ISA level, so LLVM correctly rejects them for an R1 target. Wrap those jr.hb instructions in the same ISA-level push/pop used by the working site. This keeps the MT code unchanged while making the required R2 hazard-branch encoding explicit to the assembler. Assisted-by: Codex:GPT-5.5 Signed-off-by: Rosen Penev Reviewed-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/kernel/cps-vec.S | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/mips/kernel/cps-vec.S b/arch/mips/kernel/cps-vec.S index f876309130ad1..6e80d4fdde7f7 100644 --- a/arch/mips/kernel/cps-vec.S +++ b/arch/mips/kernel/cps-vec.S @@ -360,8 +360,11 @@ LEAF(mips_cps_boot_vpes) .set pop PTR_LA t1, 1f + .set push + .set MIPS_ISA_LEVEL_RAW jr.hb t1 nop + .set pop 1: mfc0 t1, CP0_MVPCONTROL ori t1, t1, MVPCONTROL_VPC mtc0 t1, CP0_MVPCONTROL @@ -474,8 +477,11 @@ LEAF(mips_cps_boot_vpes) li t0, TCHALT_H mtc0 t0, CP0_TCHALT PTR_LA t0, 1f + .set push + .set MIPS_ISA_LEVEL_RAW 1: jr.hb t0 nop + .set pop 2: -- 2.53.0