OpenCloudOS-Kernel/arch/riscv/include/asm/vdso
Evan Green aa5af0aa90
RISC-V: Add hwprobe vDSO function and data
Add a vDSO function __vdso_riscv_hwprobe, which can sit in front of the
riscv_hwprobe syscall and answer common queries. We stash a copy of
static answers for the "all CPUs" case in the vDSO data page. This data
is private to the vDSO, so we can decide later to change what's stored
there or under what conditions we defer to the syscall. Currently all
data can be discovered at boot, so the vDSO function answers all queries
when the cpumask is set to the "all CPUs" hint.

There's also a boolean in the data that lets the vDSO function know that
all CPUs are the same. In that case, the vDSO will also answer queries
for arbitrary CPU masks in addition to the "all CPUs" hint.

Signed-off-by: Evan Green <evan@rivosinc.com>
Link: https://lore.kernel.org/r/20230407231103.2622178-7-evan@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2023-04-18 15:48:18 -07:00
..
clocksource.h riscv: use vDSO common flow to reduce the latency of the time-related functions 2020-06-10 19:47:16 -07:00
data.h RISC-V: Add hwprobe vDSO function and data 2023-04-18 15:48:18 -07:00
gettimeofday.h RISC-V: Add hwprobe vDSO function and data 2023-04-18 15:48:18 -07:00
processor.h Merge patch "riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=y" 2023-01-31 21:55:43 -08:00
vsyscall.h riscv: use vDSO common flow to reduce the latency of the time-related functions 2020-06-10 19:47:16 -07:00