git: e505c3066bbd - main - linux: implement set_upcall on aarch64
Edward Tomasz Napierala
trasz at FreeBSD.org
Wed Jun 16 09:33:23 UTC 2021
The branch main has been updated by trasz:
URL: https://cgit.FreeBSD.org/src/commit/?id=e505c3066bbdb96dd28ff4634a315346490b9b33
commit e505c3066bbdb96dd28ff4634a315346490b9b33
Author: Edward Tomasz Napierala <trasz at FreeBSD.org>
AuthorDate: 2021-06-15 12:01:02 +0000
Commit: Edward Tomasz Napierala <trasz at FreeBSD.org>
CommitDate: 2021-06-16 05:13:17 +0000
linux: implement set_upcall on aarch64
This fixes "git diff" (git-1:2.25.1-1ubuntu3).
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D30509
---
sys/arm64/linux/linux_machdep.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c
index 711ccb4fd63d..80597a2922a7 100644
--- a/sys/arm64/linux/linux_machdep.c
+++ b/sys/arm64/linux/linux_machdep.c
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
/* DTrace probes */
-LIN_SDT_PROBE_DEFINE0(machdep, linux_set_upcall, todo);
LIN_SDT_PROBE_DEFINE0(machdep, linux_mmap2, todo);
LIN_SDT_PROBE_DEFINE0(machdep, linux_rt_sigsuspend, todo);
LIN_SDT_PROBE_DEFINE0(machdep, linux_sigaltstack, todo);
@@ -84,13 +83,19 @@ linux_execve(struct thread *td, struct linux_execve_args *uap)
return (error);
}
-/* LINUXTODO: implement (or deduplicate) arm64 linux_set_upcall */
int
linux_set_upcall(struct thread *td, register_t stack)
{
- LIN_SDT_PROBE0(machdep, linux_set_upcall, todo);
- return (EDOOFUS);
+ if (stack)
+ td->td_frame->tf_sp = stack;
+
+ /*
+ * The newly created Linux thread returns
+ * to the user space by the same path that a parent does.
+ */
+ td->td_frame->tf_x[0] = 0;
+ return (0);
}
/* LINUXTODO: deduplicate arm64 linux_mmap2 */
More information about the dev-commits-src-main
mailing list