[PATCH] riscv: hwprobe: simplify has_fpu() to check D extension only

Conor Dooley conor at kernel.org
Tue Sep 1 06:06:25 PDT 2026


On Mon, Aug 31, 2026 at 07:37:46PM -0600, Ivy Lopez wrote:
> The kernel never supports D without F, since D depends on F. The
> D-extension flag is cleared during devicetree/ACPI parsing whenever
> F is not present, so has_fpu() checking either extension with '||'
> never actually produces a different result than checking D alone -
> F without D cannot occur in practice, and there is no observable
> impact on RISCV_HWPROBE_IMA_FD or userspace.
> 
> Simplify has_fpu() to check D only, matching the expectations set
> elsewhere in the kernel for this dependency, rather than relying on
> a redundant OR condition.
> 
> sys_hwprobe.c already calls has_fpu() and needs no changes.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=221874
> Suggested-by: Conor Dooley <conor.dooley at microchip.com>
> Suggested-by: Andreas Schwab <schwab at suse.de>
> Signed-off-by: Ivy Lopez <skunkolee at gmail.com>

Reviewed-by: Conor Dooley <conor.dooley at microchip.com>

Thanks,
Conor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20260901/61625926/attachment.sig>


More information about the linux-riscv mailing list