aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-08-17 00:26:15 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-08-17 00:26:15 +0000
commit8ce16f495fd888b04fb78e04ec15a5d5cdd51b6d (patch)
treea76999769c9d8dce9d215263fa29bd6d60a751a6
parent941662ca4b7172c5b2d14344463224441b6a3572 (diff)
parente9650841b6cb6fb956a7298c8febd4cfd9baa61e (diff)
downloadstrace-8ce16f495fd888b04fb78e04ec15a5d5cdd51b6d.tar.gz
Merge "Trivial decode of __riscv_hwprobe()." into main am: 031a7e8414 am: 126acd4c18 am: e9650841b6
Original change: https://android-review.googlesource.com/c/platform/external/strace/+/2708273 Change-Id: Ic3b1964f8ca48b5ccf67f8f0feebfab183bf082a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--linux/riscv/syscallent.h2
-rw-r--r--riscv.c17
-rw-r--r--sen.h1
-rw-r--r--sys_func.h1
4 files changed, 21 insertions, 0 deletions
diff --git a/linux/riscv/syscallent.h b/linux/riscv/syscallent.h
index 3dfed89e..0b5960a9 100644
--- a/linux/riscv/syscallent.h
+++ b/linux/riscv/syscallent.h
@@ -1,4 +1,6 @@
#include "64/syscallent.h"
+/* #define __NR_riscv_hwprobe (__NR_arch_specific_syscall + 14) */
+[258] = { 5, 0, SEN(riscv_hwprobe), "riscv_hwprobe" },
/* #define __NR_riscv_flush_icache (__NR_arch_specific_syscall + 15) */
[259] = { 3, TM, SEN(riscv_flush_icache), "riscv_flush_icache" },
diff --git a/riscv.c b/riscv.c
index aaa39325..7b9ae889 100644
--- a/riscv.c
+++ b/riscv.c
@@ -50,4 +50,21 @@ SYS_FUNC(riscv_flush_icache)
return RVAL_DECODED;
}
+SYS_FUNC(riscv_hwprobe)
+{
+ /* uintptr_t probes */
+ printaddr(tcp->u_arg[0]);
+
+ /* size_t probe_count, size_t cpu_count */
+ tprintf(", %lu, %lu, ", tcp->u_arg[1], tcp->u_arg[2]);
+
+ /* uintptr_t pcus */
+ printaddr(tcp->u_arg[3]);
+
+ /* unsigned flags */
+ tprintf(", %#lx", tcp->u_arg[4]);
+
+ return RVAL_DECODED;
+}
+
#endif /* RISCV */
diff --git a/sen.h b/sen.h
index fb29d69d..c5febcc8 100644
--- a/sen.h
+++ b/sen.h
@@ -273,6 +273,7 @@ SEN_renameat2,
SEN_request_key,
SEN_restart_syscall,
SEN_riscv_flush_icache,
+SEN_riscv_hwprobe,
SEN_rmdir,
SEN_rseq,
SEN_rt_sigaction,
diff --git a/sys_func.h b/sys_func.h
index 22cb3788..cdb63180 100644
--- a/sys_func.h
+++ b/sys_func.h
@@ -208,6 +208,7 @@ extern SYS_FUNC(renameat2);
extern SYS_FUNC(request_key);
extern SYS_FUNC(restart_syscall);
extern SYS_FUNC(riscv_flush_icache);
+extern SYS_FUNC(riscv_hwprobe);
extern SYS_FUNC(rt_sigaction);
extern SYS_FUNC(rt_sigpending);
extern SYS_FUNC(rt_sigprocmask);