From owner-svn-src-stable@FreeBSD.ORG Wed Mar 2 19:33:47 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47B46106566C; Wed, 2 Mar 2011 19:33:47 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35BB18FC15; Wed, 2 Mar 2011 19:33:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p22JXl5N041090; Wed, 2 Mar 2011 19:33:47 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p22JXl6q041085; Wed, 2 Mar 2011 19:33:47 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201103021933.p22JXl6q041085@svn.freebsd.org> From: Dmitry Chagin Date: Wed, 2 Mar 2011 19:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219192 - in stable/8/sys: amd64/linux32 i386/linux X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2011 19:33:47 -0000 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)