Thread (15 messages) 15 messages, 5 authors, 2023-03-31

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

From: Conor Dooley <conor@kernel.org>
Date: 2023-02-27 22:20:08
Also in: linux-riscv, lkml

On Tue, Feb 21, 2023 at 11:08:53AM -0800, 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 <redacted>
Signed-off-by: Palmer Dabbelt <redacted>
Signed-off-by: Evan Green <redacted>
+static
+int do_riscv_hwprobe(struct riscv_hwprobe __user *pairs, long pair_count,
+		      long cpu_count, unsigned long __user *cpus_user,
+		      unsigned long flags)
I almost feel bad commenting this, but this is now the only function
split like this w/ the static on its own line.

With the same caveat about ignorance about glibc's desires & lingering
doubt as to whether this interface is the right way to go, this looks
good to me now.
I'm reluctant to give an R-b for the latter reason, but assuming the
Higher Power deem this approach acceptable:
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help