[PATCH] riscv: Fixup wrong clone's arguments define
guoren at kernel.org
guoren at kernel.org
Fri Mar 22 08:58:17 UTC 2019
From: Guo Ren <ren_guo at c-sky.com>
In linux kernel riscv select CLONE_BACKWARDS in
linux/arch/riscv/Kconfig, and in linux/kernel/fork.c:
ifdef CONFIG_CLONE_BACKWARDS
SYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp,
int __user *, parent_tidptr,
unsigned long, tls,
int __user *, child_tidptr)
elif ...
So we must make the riscv clone-arguments' sequence to be:
define ARG_FLAGS 0
define ARG_STACK 1
define ARG_PTID 2
define ARG_TLS 3
define ARG_CTID 4
Signed-off-by: Guo Ren <ren_guo at c-sky.com>
Cc: Dmitry V. Levin <ldv at altlinux.org>
Cc: Palmer Dabbelt <palmer at sifive.com>
---
clone.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clone.c b/clone.c
index d37e580..64c7e95 100644
--- a/clone.c
+++ b/clone.c
@@ -42,7 +42,7 @@
# define ARG_PTID 2
# define ARG_CTID ((current_personality != 1) ? 3 : 4)
# define ARG_TLS ((current_personality != 1) ? 4 : 3)
-#elif defined ALPHA || defined TILE || defined OR1K || defined RISCV
+#elif defined ALPHA || defined TILE || defined OR1K
# define ARG_FLAGS 0
# define ARG_STACK 1
# define ARG_PTID 2
--
2.7.4
More information about the Strace-devel
mailing list