[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251222114737.1334364-17-ruanjinjie@huawei.com>
Date: Mon, 22 Dec 2025 19:47:37 +0800
From: Jinjie Ruan <ruanjinjie@...wei.com>
To: <catalin.marinas@....com>, <will@...nel.org>, <oleg@...hat.com>,
<tglx@...utronix.de>, <peterz@...radead.org>, <luto@...nel.org>,
<shuah@...nel.org>, <kees@...nel.org>, <wad@...omium.org>,
<ruanjinjie@...wei.com>, <kevin.brodsky@....com>, <macro@...am.me.uk>,
<charlie@...osinc.com>, <akpm@...ux-foundation.org>, <ldv@...ace.io>,
<anshuman.khandual@....com>, <mark.rutland@....com>, <thuth@...hat.com>,
<song@...nel.org>, <ryan.roberts@....com>, <ada.coupriediaz@....com>,
<broonie@...nel.org>, <liqiang01@...inos.cn>, <pengcan@...inos.cn>,
<kmal@...k.li>, <dvyukov@...gle.com>, <richard.weiyang@...il.com>,
<reddybalavignesh9979@...il.com>, <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <linux-kselftest@...r.kernel.org>
Subject: [PATCH v10 16/16] selftests: sud_test: Support aarch64
From: kemal <kmal@...k.li>
Support aarch64 to test "Syscall User Dispatch" with sud_test
selftest testcase.
Signed-off-by: kemal <kmal@...k.li>
---
tools/testing/selftests/syscall_user_dispatch/sud_benchmark.c | 2 +-
tools/testing/selftests/syscall_user_dispatch/sud_test.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/syscall_user_dispatch/sud_benchmark.c b/tools/testing/selftests/syscall_user_dispatch/sud_benchmark.c
index 073a03702ff5..6059abe75cb3 100644
--- a/tools/testing/selftests/syscall_user_dispatch/sud_benchmark.c
+++ b/tools/testing/selftests/syscall_user_dispatch/sud_benchmark.c
@@ -41,7 +41,7 @@
* out of the box, but don't enable them until they support syscall user
* dispatch.
*/
-#if defined(__x86_64__) || defined(__i386__)
+#if defined(__x86_64__) || defined(__i386__) || defined(__aarch64__)
#define TEST_BLOCKED_RETURN
#endif
diff --git a/tools/testing/selftests/syscall_user_dispatch/sud_test.c b/tools/testing/selftests/syscall_user_dispatch/sud_test.c
index b855c6000287..3ffea2f4a66d 100644
--- a/tools/testing/selftests/syscall_user_dispatch/sud_test.c
+++ b/tools/testing/selftests/syscall_user_dispatch/sud_test.c
@@ -192,6 +192,10 @@ static void handle_sigsys(int sig, siginfo_t *info, void *ucontext)
((ucontext_t *)ucontext)->uc_mcontext.__gregs[REG_A0] =
((ucontext_t *)ucontext)->uc_mcontext.__gregs[REG_A7];
#endif
+#ifdef __aarch64__
+ ((ucontext_t *)ucontext)->uc_mcontext.regs[0] = (unsigned int)
+ ((ucontext_t *)ucontext)->uc_mcontext.regs[8];
+#endif
}
int setup_sigsys_handler(void)
--
2.34.1
Powered by blists - more mailing lists