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 479E250B414; Wed, 30 Sep 2026 16:04:20 +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=1790784263; cv=none; b=Zc+htMxwSsuH9PH1APgkigLIx93k8dTFghZNoj7Q9BL6U+6vMR8YvnKGNNV9hWe7cDJMMNcRE1kkvVLC+KuMejDH+xFWN2mavZsgqLFnXWToIHu0+I1p9SpCfri6dWhn4US25O70BSFx6MSecSJvvyzlUwniJJxm/BcFEsjXj9U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790784263; c=relaxed/simple; bh=2UINUgucii21kmiMw8YCrV0EwHu1Lyxzb6RJl7SOuAs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UnN3QE7I4iiJpoPh9oXGdojKuPj2hSywju+skkmr63khSBQycbK5SzAoaAgR9lrSR/mRtXG5jsGnno478hz4yXo1v3d5/18g+jTHM/4B91sloLaKguZjV3o6VowLkbM/OVO88kCzo8377KJrt8gQ5Gp6VwZyLf5hjWKz0pNhVUA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=O8Rr3txD; 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="O8Rr3txD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A71E51F000FF; Wed, 30 Sep 2026 16:04:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790784258; bh=jrmgFkPUO9H/uQcOqV9i2fNUcgNZsrun6TZiUlGdBg4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=O8Rr3txD5Q2g9t11skspUzPpEklQfTUvYCcHQKPcbl5ZeOivKEdKhkLpYsPo3UnKP UWD7580e745OxtwqE5YlBA9S1KwG+rmS9G5xcg2h6yUH8mrHI9U9Onf44AChYg1I9j ys2FuEYV7JqR2XvDVdUGX3Q0CpJ6HFoGUF3TNQMU= 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.1 092/982] mips: cps: Assemble jr.hb with an R2 ISA level Date: Wed, 30 Sep 2026 17:13:48 +0200 Message-ID: <20260930152418.788108421@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152416.775402466@linuxfoundation.org> References: <20260930152416.775402466@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.1-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 9753432401487..156abad9c3249 100644 --- a/arch/mips/kernel/cps-vec.S +++ b/arch/mips/kernel/cps-vec.S @@ -394,8 +394,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 @@ -508,8 +511,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