From owner-svn-src-projects@FreeBSD.ORG Thu Oct 1 13:01:14 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0900106568B; Thu, 1 Oct 2009 13:01:14 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A16A18FC0C; Thu, 1 Oct 2009 13:01:14 +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 n91D1EHS051866; Thu, 1 Oct 2009 13:01:14 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n91D1Eoa051864; Thu, 1 Oct 2009 13:01:14 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200910011301.n91D1Eoa051864@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 1 Oct 2009 13:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197664 - projects/ppc64/sys/powerpc/aim64 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2009 13:01:14 -0000 Author: nwhitehorn Date: Thu Oct 1 13:01:14 2009 New Revision: 197664 URL: http://svn.freebsd.org/changeset/base/197664 Log: Change where we save and restore the TOC pointer. Modified: projects/ppc64/sys/powerpc/aim64/swtch.S Modified: projects/ppc64/sys/powerpc/aim64/swtch.S ============================================================================== --- projects/ppc64/sys/powerpc/aim64/swtch.S Thu Oct 1 12:52:48 2009 (r197663) +++ projects/ppc64/sys/powerpc/aim64/swtch.S Thu Oct 1 13:01:14 2009 (r197664) @@ -111,6 +111,8 @@ ENTRY(cpu_switch) std %r16,PCB_CR(%r5) mflr %r16 /* Save the link register */ std %r16,PCB_LR(%r5) + std %r1,PCB_SP(%r5) /* Save the stack pointer */ + std %r2,PCB_TOC(%r5) /* Save the TOC pointer */ li %r14,0 /* Save USER_SR for copyin/out */ li %r15,0 @@ -120,8 +122,6 @@ ENTRY(cpu_switch) isync std %r14,PCB_AIM_USR_ESID(%r5) std %r15,PCB_AIM_USR_VSID(%r5) - std %r1,PCB_SP(%r5) /* Save the stack pointer */ - std %r2,PCB_TOC(%r5) /* Save the TOC pointer */ mr %r14,%r3 /* Copy the old thread ptr... */ mr %r15,%r4 /* and the new thread ptr in scratch */ @@ -200,6 +200,8 @@ cpu_switchin: mtcr %r5 ld %r5,PCB_LR(%r3) /* Load the link register */ mtlr %r5 + ld %r1,PCB_SP(%r3) /* Load the stack pointer */ + ld %r2,PCB_TOC(%r3) /* Load the TOC pointer */ li %r5,USER_SR /* Load the USER_SR segment reg */ sldi %r5,%r5,28 @@ -210,8 +212,6 @@ cpu_switchin: slbmte %r5,%r6 isync - ld %r1,PCB_SP(%r3) /* Load the stack pointer */ - ld %r2,PCB_TOC(%r3) /* Load the TOC pointer */ /* * Perform a dummy stwcx. to clear any reservations we may have * inherited from the previous thread. It doesn't matter if the @@ -248,6 +248,7 @@ ENTRY(savectx) mfcr %r4 /* Save the condition register */ std %r4,PCB_CR(%r3) + std %r2,PCB_TOC(%r3) /* Save the TOC pointer */ blr /*