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 AA323420E9F for ; Tue, 18 Aug 2026 09:45:38 +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=1787046339; cv=none; b=BnlBdfJpO9NmZk2eh7hPjseG/enBv5wHdpXbT6eaPhj0zAD1197xE0xsp2bVqpgrN6mCbliiGOB4OtP80iEz9c2x2O7sDSzwxhIuGwWTzRnSWnkVccqIBPku3x14S3JghoqXBHokCq/8SSTh1s1kPaOcSl2/ZKHU91urJBcXmKk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787046339; c=relaxed/simple; bh=lxh47bE0eJzEi3uLLxOK0tSzMFY3vWxKYVwvwmXkahI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tGiphpXr/t8sss1SYbLWz2WcAi/m8Nt2K11vbIgA8SAQSRfbMSkotsc6gZYjRqL7R/FzCyBNI7WFwQnmmidh9KFHv6KmV7eXTkT0RrYZOdk/d3ekR95xO9Lp061V05CJKvi8nPMY4Qg+uylgvbGhufmrRixcQ601S/MK8KyqDJM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QA/kUcVl; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QA/kUcVl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5CF21F00A3D; Tue, 18 Aug 2026 09:45:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787046338; bh=lxh47bE0eJzEi3uLLxOK0tSzMFY3vWxKYVwvwmXkahI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=QA/kUcVl1gBFWaEcZbEEmA4ftKlCm6wMEV58ryRTFN1iyW1KOCl/ZkhdkHu64Am7C CoPkXKml4NuWlOW0WTS7BF0R2kRJLsBcHmAwf5NK2L2nzw9yVL/vYGSvl7IPTZGvs5 ui82O9Vp2FujHe+YpBLiDqelqa2rk6DRPDcV86FkGUzOfPyOe64jxPCLoShfVQWIl6 87B7eQQRzyGPjW9Pr6BFzJmx1Br1wi0cXsboiPU9Pwvkb1fIccKFcb8TGLLjhnCCw8 2KNMEkCICtM9bo0hTmLC3NVeFk+pJT4POdyN4LKvA0sen4mLS6qs9FWIGExbf+kakq e0S6aJuCLRppQ== Date: Tue, 18 Aug 2026 10:45:34 +0100 From: Conor Dooley To: Ivy Lopez Cc: conor.dooley@microchip.com, alex@ghiti.fr, andrew.jones@oss.qualcomm.com, aou@eecs.berkeley.edu, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, palmer@dabbelt.com, pjw@kernel.org Subject: Re: [PATCH] riscv: hwprobe: require both F and D extensions for RISCV_HWPROBE_IMA_FD Message-ID: <20260818-uninstall-opposite-b713ce801f5c@spud> References: <20260817-unmade-dyslexic-4bb4acf535af@wendy> <20260817211507.28685-1-skunkolee@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="UR2iiSoY9sceda38" Content-Disposition: inline In-Reply-To: <20260817211507.28685-1-skunkolee@gmail.com> --UR2iiSoY9sceda38 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 17, 2026 at 03:15:07PM -0600, Ivy Lopez wrote: > On Mon, Aug 17, 2026 at 03:14:36PM +0100, Conor Dooley wrote: > > The kernel never supports F without D, so this cannot occur. > > riscv_isa_extension_available(NULL, f) always returns false if D is not > > also present. > > > > If anything, the code in has_fpu() should be changed to only check D and > > not F to match expectations elsewhere, or F and D for the same reason. >=20 > Ah ok, thanks for the clarification.. I hadn't realized F-without-D is > already structurally impossible here, so this patch doesn't change > actual behavior. >=20 > Would you prefer a v2 that fixes has_fpu() instead (checking D only, > or F && D, whichever matches the intended semantics elsewhere), or > would you rather I just drop this patch since RISCV_HWPROBE_IMA_FD already > behaves correctly in practice? >=20 > Happy to send whichever you'd find useful! I think I would rather see has_fpu() get changed. I think checking either D only (ideally with a comment explaining why that's correct to do) or checking both are equally valid, which to do is up to you. I don't think there's really any other equivalents to this has_fpu() code because anything that would do it just calls has_fpu() instead! The closest thing to it that I found is code in cpufeature.c that only checks D (with comments), but that code is part of the wider extension parsing logic that where the block on F without D happens in the first place, so it may not be the best example. In the future, when replying, please try to keep more than just one mail of context, to make it easier for people to follow the conversation if this is the only mail they read or if they forgot exactly what was going on in the previous ones. Cheers, Conor. --UR2iiSoY9sceda38 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCaoQpvgAKCRB4tDGHoIJi 0p8XAP90QgkBM+N2QT+XtDm/msMcyWeJrpYVPoOLdAxGPL3dpQEAkNSaf9PWQMhQ BWvah9YbgBwis1ciOb639ZyaGQSu4wU= =Ftnu -----END PGP SIGNATURE----- --UR2iiSoY9sceda38--