mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

This adds a test for the recently added RISC-V interface for probing hardware capabilities. It happens to be the first selftest we have for RISC-V, so I've added some infrastructure for those as well. Co-developed-by: Palmer Dabbelt <palmer@rivosinc.com> Signed-off-by: Evan Green <evan@rivosinc.com> Link: https://lore.kernel.org/r/20230407231103.2622178-6-evan@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
12 lines
322 B
ArmAsm
12 lines
322 B
ArmAsm
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (C) 2023 Rivos, Inc */
|
|
|
|
.text
|
|
.global riscv_hwprobe
|
|
riscv_hwprobe:
|
|
# Put __NR_riscv_hwprobe in the syscall number register, then just shim
|
|
# back the kernel's return. This doesn't do any sort of errno
|
|
# handling, the caller can deal with it.
|
|
li a7, 258
|
|
ecall
|
|
ret
|