diff options
author | David S. Miller <davem@davemloft.net> | 2010-03-29 13:08:52 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-29 13:08:52 -0700 |
commit | 9e8307ecaf9f8c8b5b3b22145021204c4e73114a (patch) | |
tree | d0361a2e093120880adecbd87c1f0f26a57541e9 /arch/sparc | |
parent | d2566af8c4860a03ca685ef0910de406679c3e4e (diff) |
sparc64: Properly truncate pt_regs framepointer in perf callback.
For 32-bit processes, we save the full 64-bits of the regs in pt_regs.
But unlike when the userspace actually does load and store
instructions, the top 32-bits don't get automatically truncated by the
cpu in kernel mode (because the kernel doesn't execute with PSTATE_AM
address masking enabled).
So we have to do it by hand.
Reported-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/perf_event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index 9f2b2bac8b2b..610112ec518a 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c @@ -1337,7 +1337,7 @@ static void perf_callchain_user_32(struct pt_regs *regs, callchain_store(entry, PERF_CONTEXT_USER); callchain_store(entry, regs->tpc); - ufp = regs->u_regs[UREG_I6]; + ufp = regs->u_regs[UREG_I6] & 0xffffffffUL; do { struct sparc_stackf32 *usf, sf; unsigned long pc; |