svn commit: r218613 - in head/sys: amd64/linux32 i386/linux
Dmitry Chagin
dchagin at FreeBSD.org
Sat Feb 12 16:33:00 UTC 2011
Author: dchagin
Date: Sat Feb 12 16:33:00 2011
New Revision: 218613
URL: http://svn.freebsd.org/changeset/base/218613
Log:
In preparation for moving linux_clone() to a MI path
introduce linux_set_upcall_kse().
Modified:
head/sys/amd64/linux32/linux.h
head/sys/amd64/linux32/linux32_machdep.c
head/sys/i386/linux/linux.h
head/sys/i386/linux/linux_machdep.c
Modified: head/sys/amd64/linux32/linux.h
==============================================================================
--- head/sys/amd64/linux32/linux.h Sat Feb 12 15:50:21 2011 (r218612)
+++ head/sys/amd64/linux32/linux.h Sat Feb 12 16:33:00 2011 (r218613)
@@ -920,4 +920,6 @@ struct linux_robust_list_head {
l_uintptr_t pending_list;
};
+int linux_set_upcall_kse(struct thread *td, register_t stack);
+
#endif /* !_AMD64_LINUX_H_ */
Modified: head/sys/amd64/linux32/linux32_machdep.c
==============================================================================
--- head/sys/amd64/linux32/linux32_machdep.c Sat Feb 12 15:50:21 2011 (r218612)
+++ head/sys/amd64/linux32/linux32_machdep.c Sat Feb 12 16:33:00 2011 (r218613)
@@ -655,7 +655,7 @@ linux_clone(struct thread *td, struct li
* intact.
*/
if (args->stack)
- td2->td_frame->tf_rsp = PTROUT(args->stack);
+ linux_set_upcall_kse(td2, PTROUT(args->stack));
if (args->flags & LINUX_CLONE_SETTLS)
linux_set_cloned_tls(td2, args->tls);
@@ -694,6 +694,15 @@ linux_clone(struct thread *td, struct li
return (0);
}
+int
+linux_set_upcall_kse(struct thread *td, register_t stack)
+{
+
+ td->td_frame->tf_rsp = stack;
+
+ return (0);
+}
+
#define STACK_SIZE (2 * 1024 * 1024)
#define GUARD_SIZE (4 * PAGE_SIZE)
Modified: head/sys/i386/linux/linux.h
==============================================================================
--- head/sys/i386/linux/linux.h Sat Feb 12 15:50:21 2011 (r218612)
+++ head/sys/i386/linux/linux.h Sat Feb 12 16:33:00 2011 (r218613)
@@ -880,4 +880,6 @@ struct linux_robust_list_head {
struct linux_robust_list *pending_list;
};
+int linux_set_upcall_kse(struct thread *td, register_t stack);
+
#endif /* !_I386_LINUX_H_ */
Modified: head/sys/i386/linux/linux_machdep.c
==============================================================================
--- head/sys/i386/linux/linux_machdep.c Sat Feb 12 15:50:21 2011 (r218612)
+++ head/sys/i386/linux/linux_machdep.c Sat Feb 12 16:33:00 2011 (r218613)
@@ -559,7 +559,7 @@ linux_clone(struct thread *td, struct li
* this is what normal fork() does so we just keep the tf_esp arg intact
*/
if (args->stack)
- td2->td_frame->tf_esp = (unsigned int)args->stack;
+ linux_set_upcall_kse(td2, PTROUT(args->stack));
if (args->flags & LINUX_CLONE_SETTLS)
linux_set_cloned_tls(td2, args->tls);
@@ -597,6 +597,15 @@ linux_clone(struct thread *td, struct li
return (0);
}
+int
+linux_set_upcall_kse(struct thread *td, register_t stack)
+{
+
+ td->td_frame->tf_esp = stack;
+
+ return (0);
+}
+
#define STACK_SIZE (2 * 1024 * 1024)
#define GUARD_SIZE (4 * PAGE_SIZE)
More information about the svn-src-all
mailing list