aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/riscv/hwprobe/sys_hwprobe.S
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/riscv/hwprobe/sys_hwprobe.S')
-rw-r--r--tools/testing/selftests/riscv/hwprobe/sys_hwprobe.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/testing/selftests/riscv/hwprobe/sys_hwprobe.S b/tools/testing/selftests/riscv/hwprobe/sys_hwprobe.S
new file mode 100644
index 000000000000..a4773c88d267
--- /dev/null
+++ b/tools/testing/selftests/riscv/hwprobe/sys_hwprobe.S
@@ -0,0 +1,12 @@
+/* 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