From owner-svn-src-head@FreeBSD.ORG Sun Dec 15 18:07:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDBC4A04; Sun, 15 Dec 2013 18:07:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BAA5C155A; Sun, 15 Dec 2013 18:07:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBFI7PCn021204; Sun, 15 Dec 2013 18:07:25 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBFI7PHw021202; Sun, 15 Dec 2013 18:07:25 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201312151807.rBFI7PHw021202@svn.freebsd.org> From: Justin Hibbits Date: Sun, 15 Dec 2013 18:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259421 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Dec 2013 18:07:25 -0000 Author: jhibbits Date: Sun Dec 15 18:07:25 2013 New Revision: 259421 URL: http://svnweb.freebsd.org/changeset/base/259421 Log: Save r3 before using it for the trap check, else we end up saving the new r3, containing the trap instruction encoding (0x7c810808), and restoring it back with the frame on return. This caused it to panic on my ppc32 machine, but somehow my ppc64 machine overlooked it, because I was using such a simple dtrace probe. X-MFC-with: r259245 MFC after: 2 weeks Modified: head/sys/powerpc/aim/trap_subr32.S head/sys/powerpc/aim/trap_subr64.S Modified: head/sys/powerpc/aim/trap_subr32.S ============================================================================== --- head/sys/powerpc/aim/trap_subr32.S Sun Dec 15 18:05:04 2013 (r259420) +++ head/sys/powerpc/aim/trap_subr32.S Sun Dec 15 18:07:25 2013 (r259421) @@ -897,11 +897,13 @@ CNAME(dblow): #ifdef KDTRACE_HOOKS /* Privileged, so drop to KDB */ mfsrr0 %r1 - lwz %r4,0(%r1) + mtsprg3 %r3 + lwz %r1,0(%r1) /* Check if it's a DTrace trap. */ li %r3,0x0808 addis %r3,%r3,0x7c81 - cmplw %cr0,%r3,%r4 + cmplw %cr0,%r3,%r1 + mfsprg3 %r3 beq %cr0,1b #endif /* Privileged, so drop to KDB */ Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Sun Dec 15 18:05:04 2013 (r259420) +++ head/sys/powerpc/aim/trap_subr64.S Sun Dec 15 18:07:25 2013 (r259421) @@ -804,11 +804,13 @@ CNAME(dblow): #ifdef KDTRACE_HOOKS /* Privileged, so drop to KDB */ mfsrr0 %r1 - lwz %r4,0(%r1) + mtsprg3 %r3 + lwz %r1,0(%r1) /* Check if it's a DTrace trap. */ li %r3,0x0808 addis %r3,%r3,0x7c81 - cmplw %cr0,%r3,%r4 + cmplw %cr0,%r3,%r1 + mfsprg3 %r3 beq %cr0,1b #endif GET_CPUINFO(%r1)