From owner-svn-src-all@FreeBSD.ORG Sat Feb 12 16:33:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 996931065670; Sat, 12 Feb 2011 16:33:00 +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 6D58B8FC08; Sat, 12 Feb 2011 16:33:00 +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 p1CGX0gH007618; Sat, 12 Feb 2011 16:33:00 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1CGX0D3007613; Sat, 12 Feb 2011 16:33:00 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201102121633.p1CGX0D3007613@svn.freebsd.org> From: Dmitry Chagin Date: Sat, 12 Feb 2011 16:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218613 - in head/sys: amd64/linux32 i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Feb 2011 16:33:00 -0000 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)