Re: [PATCH v5 2/6] RISC-V: Add a syscall for HW probing

From: Paul Walmsley
Date: Wed Apr 05 2023 - 09:57:28 EST


On Mon, 27 Mar 2023, Evan Green wrote:

> We don't have enough space for these all in ELF_HWCAP{,2} and there's no
> system call that quite does this, so let's just provide an arch-specific
> one to probe for hardware capabilities. This currently just provides
> m{arch,imp,vendor}id, but with the key-value pairs we can pass more in
> the future.
>
> Co-developed-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
> Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
> Signed-off-by: Evan Green <evan@xxxxxxxxxxxx>
> Reviewed-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>
> Reviewed-by: Heiko Stuebner <heiko.stuebner@xxxxxxxx>
> Tested-by: Heiko Stuebner <heiko.stuebner@xxxxxxxx>

Folks are already building RISC-V systems with cores that have different
feature sets inside the same Linux system image - just like some ARM
vendors are - so it makes sense to pass this information onto userspace.

By the way, Evan, did you intend to update the copyright dates to include
2023?

Beyond that,

Reviewed-by: Paul Walmsley <paul.walmsley@xxxxxxxxxx>


- Paul