Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Dec 2016 02:57:19 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r310438 - stable/11/sys/cddl/dev/dtrace/powerpc
Message-ID:  <201612230257.uBN2vJUm085713@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Fri Dec 23 02:57:19 2016
New Revision: 310438
URL: https://svnweb.freebsd.org/changeset/base/310438

Log:
  MFC r303796:
  
    Two fixups for dtrace
  
    * Use the right incantation to get the next stack pointer.
    * Clear EE using the correct instruction sequence.

Modified:
  stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S
  stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S
==============================================================================
--- stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S	Fri Dec 23 02:57:00 2016	(r310437)
+++ stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S	Fri Dec 23 02:57:19 2016	(r310438)
@@ -67,7 +67,13 @@ dtrace_icookie_t dtrace_interrupt_disabl
 */
 ASENTRY_NOPROF(dtrace_interrupt_disable)
 	mfmsr	%r3
-	andi.	%r0,%r3,~PSL_EE@l
+#ifdef __powerpc64__
+	/* Two-instruction sequence to clear EE flag */
+	rldicl	%r0,%r3,48,1
+	rotldi	%r0,%r0,16
+#else
+	rlwinm	%r0,%r3,0,~PSL_EE /* Clear EE flag */
+#endif
 	mtmsr	%r0
 	blr
 END(dtrace_interrupt_disable)

Modified: stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
==============================================================================
--- stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c	Fri Dec 23 02:57:00 2016	(r310437)
+++ stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c	Fri Dec 23 02:57:19 2016	(r310438)
@@ -545,7 +545,7 @@ dtrace_getstackdepth(int aframes)
 		else
 			aframes--;
 		osp = sp;
-		sp = *(uintptr_t *)sp;
+		sp = dtrace_next_sp(sp);
 	}
 	if (depth < aframes)
 		return (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612230257.uBN2vJUm085713>