Skip to content

Commit 098921e

Browse files
t-8chPaul Walmsley
authored andcommitted
selftests: riscv: vstate_exec_nolibc: Use the regular prctl() function
The my_syscall*() macros are internal implementation details of nolibc. Now that nolibc has a normal prctl() function, use that. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://patch.msgid.link/20260117-nolibc-mysyscall-riscv-v1-1-0ae1ae3513e9@weissschuh.net Signed-off-by: Paul Walmsley <pjw@kernel.org>
1 parent 849f05a commit 098921e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ int main(int argc, char **argv)
1616
if (argc > 2 && strcmp(argv[2], "x"))
1717
xtheadvector = 1;
1818

19-
ctrl = my_syscall1(__NR_prctl, PR_RISCV_V_GET_CONTROL);
20-
if (ctrl < 0) {
19+
ctrl = prctl(PR_RISCV_V_GET_CONTROL, 0, 0, 0, 0);
20+
if (ctrl == -1) {
2121
puts("PR_RISCV_V_GET_CONTROL is not supported\n");
22-
return ctrl;
22+
exit(-1);
2323
}
2424

2525
if (test_inherit) {
@@ -51,7 +51,7 @@ int main(int argc, char **argv)
5151
}
5252

5353
if (!pid) {
54-
rc = my_syscall1(__NR_prctl, PR_RISCV_V_GET_CONTROL);
54+
rc = prctl(PR_RISCV_V_GET_CONTROL, 0, 0, 0, 0);
5555
if (rc != ctrl) {
5656
puts("child's vstate_ctrl not equal to parent's\n");
5757
exit(-1);

0 commit comments

Comments
 (0)