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
This commit is contained in:
parent
a00a0d2a1e
commit
72b0bd154f
@ -897,11 +897,13 @@ CNAME(dblow):
|
|||||||
#ifdef KDTRACE_HOOKS
|
#ifdef KDTRACE_HOOKS
|
||||||
/* Privileged, so drop to KDB */
|
/* Privileged, so drop to KDB */
|
||||||
mfsrr0 %r1
|
mfsrr0 %r1
|
||||||
lwz %r4,0(%r1)
|
mtsprg3 %r3
|
||||||
|
lwz %r1,0(%r1)
|
||||||
/* Check if it's a DTrace trap. */
|
/* Check if it's a DTrace trap. */
|
||||||
li %r3,0x0808
|
li %r3,0x0808
|
||||||
addis %r3,%r3,0x7c81
|
addis %r3,%r3,0x7c81
|
||||||
cmplw %cr0,%r3,%r4
|
cmplw %cr0,%r3,%r1
|
||||||
|
mfsprg3 %r3
|
||||||
beq %cr0,1b
|
beq %cr0,1b
|
||||||
#endif
|
#endif
|
||||||
/* Privileged, so drop to KDB */
|
/* Privileged, so drop to KDB */
|
||||||
|
@ -804,11 +804,13 @@ CNAME(dblow):
|
|||||||
#ifdef KDTRACE_HOOKS
|
#ifdef KDTRACE_HOOKS
|
||||||
/* Privileged, so drop to KDB */
|
/* Privileged, so drop to KDB */
|
||||||
mfsrr0 %r1
|
mfsrr0 %r1
|
||||||
lwz %r4,0(%r1)
|
mtsprg3 %r3
|
||||||
|
lwz %r1,0(%r1)
|
||||||
/* Check if it's a DTrace trap. */
|
/* Check if it's a DTrace trap. */
|
||||||
li %r3,0x0808
|
li %r3,0x0808
|
||||||
addis %r3,%r3,0x7c81
|
addis %r3,%r3,0x7c81
|
||||||
cmplw %cr0,%r3,%r4
|
cmplw %cr0,%r3,%r1
|
||||||
|
mfsprg3 %r3
|
||||||
beq %cr0,1b
|
beq %cr0,1b
|
||||||
#endif
|
#endif
|
||||||
GET_CPUINFO(%r1)
|
GET_CPUINFO(%r1)
|
||||||
|
Loading…
Reference in New Issue
Block a user