From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3E6638C01 for ; Wed, 22 Mar 2023 15:17:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC84EC433D2; Wed, 22 Mar 2023 15:17:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679498238; bh=x14uXdcyN6NwgG+IiJ4mbAithUacI0jt05p67YoWCxo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vHu19ck37uJ0Noh8bpkiMcCiwaHGbeUk3AoCX1D9/uQoq+m7Jeuc8mcRjW+sjs9Lk fbtSCGNHoVaCLkM+gy9b113QC3L9P3tPRFwAwXVYqne0L6m1WsStAc3vF68MVMmioy DFgwckFmD9AIGERIB82AVK9Ky5AeChx0LNAwp/CFcXL7eda2sw3GF0mPer4I4lyLnp gfkoc0/szZ4DO1Ledjhc2NLZDfgsL8NnB9ScltQ4AeiF9yhWDzy4Ovu7qZvWWgAy/5 u3d8cxwwZoaBPfWmkClx6UKw4Dc/iBmHk4ZwkcWBzuibER73j2ug9b6v5sdS8H50su L4dbHUHyU98Zg== Date: Wed, 22 Mar 2023 15:17:13 +0000 From: Conor Dooley To: Andrew Jones Cc: "Jason A. Donenfeld" , Jisheng Zhang , Palmer Dabbelt , Paul Walmsley , Albert Ou , Anup Patel , Atish Patra , Heiko Stuebner , Conor Dooley , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, regressions@leemhuis.info, regressions@lists.linux.dev Subject: Re: [PATCH] riscv: require alternatives framework when selecting FPU support Message-ID: <1884bd96-2783-4556-bc57-8b733758baff@spud> References: <20230322120907.2968494-1-Jason@zx2c4.com> <20230322124631.7p67thzeblrawsqj@orel> Precedence: bulk X-Mailing-List: regressions@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="B7v5JtRVPQGXVgO3" Content-Disposition: inline In-Reply-To: <20230322124631.7p67thzeblrawsqj@orel> --B7v5JtRVPQGXVgO3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 22, 2023 at 01:46:31PM +0100, Andrew Jones wrote: > On Wed, Mar 22, 2023 at 01:09:07PM +0100, Jason A. Donenfeld wrote: > > When moving switch_to's has_fpu() over to using riscv_has_extension_ > > likely() rather than static branchs, the FPU code gained a dependency on > > the alternatives framework. If CONFIG_RISCV_ALTERNATIVE isn't selected > > when CONFIG_FPU is, then has_fpu() returns false, and switch_to does not > > work as intended. So select CONFIG_RISCV_ALTERNATIVE when CONFIG_FPU is > > selected. > >=20 > > Fixes: 702e64550b12 ("riscv: fpu: switch has_fpu() to riscv_has_extensi= on_likely()") > > Link: https://lore.kernel.org/all/ZBruFRwt3rUVngPu@zx2c4.com/ > > Cc: Jisheng Zhang > > Cc: Andrew Jones > > Cc: Heiko Stuebner > > Cc: Conor Dooley Thanks for fixing it! Reviewed-by: Conor Dooley > > Signed-off-by: Jason A. Donenfeld > > --- > > arch/riscv/Kconfig | 1 + > > 1 file changed, 1 insertion(+) > >=20 > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > > index c5e42cc37604..0f59350c699d 100644 > > --- a/arch/riscv/Kconfig > > +++ b/arch/riscv/Kconfig > > @@ -467,6 +467,7 @@ config TOOLCHAIN_HAS_ZIHINTPAUSE > > config FPU > > bool "FPU support" > > default y > > + select RISCV_ALTERNATIVE > > help > > Say N here if you want to disable all floating-point related proced= ure > > in the kernel. > > --=20 > > 2.40.0 > > >=20 > Reviewed-by: Andrew Jones >=20 > I took a look to see if we missed anything else and see that we should > do the same patch for KVM. I'll send one. >=20 > (It's tempting to just select RISCV_ALTERNATIVE from RISCV, but maybe we > can defer that wedding a bit longer.) At that point, the config option should just go away entirely, no? --B7v5JtRVPQGXVgO3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZBsb2wAKCRB4tDGHoIJi 0m+3AQCe8JDweaSMp3gkW9PkqtzV9SdMdFtfRNgo0IR/sPVzowD/brjdaYh5/LCw MO5YGP9cVuRb+cGX+RlJV2Skhb0lHgA= =pPeQ -----END PGP SIGNATURE----- --B7v5JtRVPQGXVgO3--