diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2013-08-19 05:10:46 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2013-08-19 05:10:46 +0000 |
commit | 155c20d90c98c13d8b2bf8a6fd0843a3eb575789 (patch) | |
tree | a2b9c87ea0adc2a06d1d3aa6a6607f43cdabc510 /sys/cddl/dev | |
parent | d80ee1955bb81944081da04233926bb470fb14fb (diff) | |
download | FreeBSD-src-155c20d90c98c13d8b2bf8a6fd0843a3eb575789.zip FreeBSD-src-155c20d90c98c13d8b2bf8a6fd0843a3eb575789.tar.gz |
Fix some ppc64 dtrace bugs, and enable systrace_freebsd32 for ppc64.
Diffstat (limited to 'sys/cddl/dev')
-rw-r--r-- | sys/cddl/dev/dtrace/powerpc/dtrace_asm.S | 11 | ||||
-rw-r--r-- | sys/cddl/dev/dtrace/powerpc/dtrace_isa.c | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S b/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S index 810517f..79079e5 100644 --- a/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S +++ b/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S @@ -50,6 +50,7 @@ void dtrace_membar_producer(void) */ ASENTRY_NOPROF(dtrace_membar_producer) + sync blr END(dtrace_membar_producer) @@ -57,6 +58,7 @@ END(dtrace_membar_producer) void dtrace_membar_consumer(void) */ ASENTRY_NOPROF(dtrace_membar_consumer) + isync blr END(dtrace_membar_consumer) @@ -97,12 +99,21 @@ void * dtrace_casptr(void *target, void *cmp, void *new) */ ASENTRY_NOPROF(dtrace_casptr) +#ifdef __powerpc64__ +1: + ldarx %r0,0,%r3 + cmpd %r4,%r0 + bne 2f + stdcx. %r5,0,%r3 + bne 1b +#else 1: lwarx %r0,0,%r3 cmpw %r4,%r0 bne 2f stwcx. %r5,0,%r3 bne 1b +#endif 2: mr %r3,%r0 blr END(dtrace_casptr) diff --git a/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c b/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c index a68ee65..3793adf 100644 --- a/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c @@ -80,7 +80,11 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes, if (!INKERNEL((long) sp)) break; +#ifdef __powerpc64__ + callpc = *(uintptr_t *)(sp + RETURN_OFFSET64); +#else callpc = *(uintptr_t *)(sp + RETURN_OFFSET); +#endif if (!INKERNEL(callpc)) break; |