Hey Charlie, Just me being a pain again... On Fri, May 03, 2024 at 11:18:18AM -0700, Charlie Jenkins wrote: > @@ -671,6 +713,11 @@ void __init riscv_fill_hwcap(void) > pr_info("Falling back to deprecated \"riscv,isa\"\n"); > riscv_fill_hwcap_from_isa_string(isa2hwcap); > } > + > + if (elf_hwcap & COMPAT_HWCAP_ISA_V && has_riscv_homogeneous_vlenb() < 0) { > + pr_warn("Unsupported heterogeneous vlen detected, vector extension disabled.\n"); > + elf_hwcap &= ~COMPAT_HWCAP_ISA_V; > + } > } After replying to Andy this morning about doing some dependency checking for vector-reliant extensions I realised that we're actually doing this check too late to be useful for that case. Say for Zvkb we want to check if vector has been enabled before marking the extension available, and without Clement's series that re-works the riscv_isa_extension_check(), we need to ensure that vector support isn't gonna get turned after we've already marked Zvkb as usable. If we could move the riscv_has_homogeneous_vlenb() call before probing extensions we could then examine the result in riscv_isa_extension_check() for V and make sure it doesn't get enabled in the first place, rather than clearing it after the fact. There's a whole load of moving pieces between different series here at the moment though, I wish some of it would land so that I could send some cleanup patches for what I think is inconsistency on top :) I wouldn't mind if this landed as-is, it's still an improvement and the user I mention above doesn't actually exist yet. Reviewed-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx> Cheers, Conor.
Attachment:
signature.asc
Description: PGP signature