From owner-svn-src-all@FreeBSD.ORG Wed Apr 22 13:13:35 2009 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 5C166106568A; Wed, 22 Apr 2009 13:13:35 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4AEAE8FC21; Wed, 22 Apr 2009 13:13:35 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3MDDZ6V056397; Wed, 22 Apr 2009 13:13:35 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3MDDZRL056395; Wed, 22 Apr 2009 13:13:35 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200904221313.n3MDDZRL056395@svn.freebsd.org> From: Rafal Jaworowski Date: Wed, 22 Apr 2009 13:13:35 +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: r191376 - head/sys/powerpc/booke 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: Wed, 22 Apr 2009 13:13:35 -0000 Author: raj Date: Wed Apr 22 13:13:34 2009 New Revision: 191376 URL: http://svn.freebsd.org/changeset/base/191376 Log: Provide cpu_throw() for Book-E. Adjust cpu_switch() towards ULE support. Obtained from: Freescale, Semihalf Modified: head/sys/powerpc/booke/swtch.S head/sys/powerpc/booke/vm_machdep.c Modified: head/sys/powerpc/booke/swtch.S ============================================================================== --- head/sys/powerpc/booke/swtch.S Wed Apr 22 13:11:38 2009 (r191375) +++ head/sys/powerpc/booke/swtch.S Wed Apr 22 13:13:34 2009 (r191376) @@ -69,11 +69,20 @@ #include /* - * void cpu_switch(struct thread *old, struct thread *new) + * void cpu_throw(struct thread *old, struct thread *new) + */ +ENTRY(cpu_throw) + mr %r15, %r4 + b cpu_switchin + +/* + * void cpu_switch(struct thread *old, struct thread *new, struct mutex *mtx);) * * Switch to a new thread saving the current state in the old thread. */ ENTRY(cpu_switch) + stw %r5, TD_LOCK(%r3) + lwz %r5, TD_PCB(%r3) /* Get the old thread's PCB ptr */ mr %r12, %r2 @@ -98,6 +107,7 @@ ENTRY(cpu_switch) bl pmap_deactivate /* Deactivate the current pmap */ +cpu_switchin: mr %r3, %r15 /* Get new thread ptr */ bl pmap_activate /* Activate the new address space */ Modified: head/sys/powerpc/booke/vm_machdep.c ============================================================================== --- head/sys/powerpc/booke/vm_machdep.c Wed Apr 22 13:11:38 2009 (r191375) +++ head/sys/powerpc/booke/vm_machdep.c Wed Apr 22 13:13:34 2009 (r191376) @@ -248,15 +248,6 @@ cpu_exit(struct thread *td) } -/* Temporary helper */ -void -cpu_throw(struct thread *old, struct thread *new) -{ - - cpu_switch(old, new, NULL); - panic("cpu_throw() didn't"); -} - /* * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) */