summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2016-12-23 02:57:19 +0000
committerjhibbits <jhibbits@FreeBSD.org>2016-12-23 02:57:19 +0000
commit36d88640d74da909ec14a3ba3e46e9d899465d54 (patch)
treecc58f7c897d95a2b714e15e4b89a3e88a0de9d05 /sys/cddl
parentf68221a306bea7ba6238d1394440f90e03da1416 (diff)
downloadFreeBSD-src-36d88640d74da909ec14a3ba3e46e9d899465d54.zip
FreeBSD-src-36d88640d74da909ec14a3ba3e46e9d899465d54.tar.gz
MFC r303796:
Two fixups for dtrace * Use the right incantation to get the next stack pointer. * Clear EE using the correct instruction sequence.
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/dev/dtrace/powerpc/dtrace_asm.S8
-rw-r--r--sys/cddl/dev/dtrace/powerpc/dtrace_isa.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S b/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S
index 3adfbe3..e5de4f7 100644
--- a/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S
+++ b/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S
@@ -67,7 +67,13 @@ dtrace_icookie_t dtrace_interrupt_disable(void)
*/
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)
diff --git a/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c b/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
index d80e950..950e9ac 100644
--- a/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
+++ b/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
@@ -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);
OpenPOWER on IntegriCloud