Date: Wed, 2 Mar 2011 19:33:47 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r219192 - in stable/8/sys: amd64/linux32 i386/linux Message-ID: <201103021933.p22JXl6q041085@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Wed Mar 2 19:33:46 2011 New Revision: 219192 URL: http://svn.freebsd.org/changeset/base/219192 Log: MFC r218613: In preparation for moving linux_clone() to a MI path introduce linux_set_upcall_kse() which is used for MD works. Modified: stable/8/sys/amd64/linux32/linux.h stable/8/sys/amd64/linux32/linux32_machdep.c stable/8/sys/i386/linux/linux.h stable/8/sys/i386/linux/linux_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/linux32/linux.h ============================================================================== --- stable/8/sys/amd64/linux32/linux.h Wed Mar 2 19:31:53 2011 (r219191) +++ stable/8/sys/amd64/linux32/linux.h Wed Mar 2 19:33:46 2011 (r219192) @@ -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: stable/8/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- stable/8/sys/amd64/linux32/linux32_machdep.c Wed Mar 2 19:31:53 2011 (r219191) +++ stable/8/sys/amd64/linux32/linux32_machdep.c Wed Mar 2 19:33:46 2011 (r219192) @@ -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: stable/8/sys/i386/linux/linux.h ============================================================================== --- stable/8/sys/i386/linux/linux.h Wed Mar 2 19:31:53 2011 (r219191) +++ stable/8/sys/i386/linux/linux.h Wed Mar 2 19:33:46 2011 (r219192) @@ -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: stable/8/sys/i386/linux/linux_machdep.c ============================================================================== --- stable/8/sys/i386/linux/linux_machdep.c Wed Mar 2 19:31:53 2011 (r219191) +++ stable/8/sys/i386/linux/linux_machdep.c Wed Mar 2 19:33:46 2011 (r219192) @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103021933.p22JXl6q041085>