sparc64: perf: Use UREG_FP rather than UREG_I6
authorDavid Ahern <david.ahern@oracle.com>
Mon, 15 Jun 2015 20:15:46 +0000 (16:15 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Jun 2015 13:01:03 +0000 (06:01 -0700)
perf walks userspace callchains by following frame pointers. Use the
UREG_FP macro to make it clearer that the %fp is being used.

Signed-off-by: David Ahern <david.ahern@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/perf_event.c

index a665e3f8c6c61610c7037e5ec251d06273dfccb6..689db65f85294a95051d08e4f7846151ccc002de 100644 (file)
@@ -1756,7 +1756,7 @@ static void perf_callchain_user_64(struct perf_callchain_entry *entry,
 {
        unsigned long ufp;
 
-       ufp = regs->u_regs[UREG_I6] + STACK_BIAS;
+       ufp = regs->u_regs[UREG_FP] + STACK_BIAS;
        do {
                struct sparc_stackf __user *usf;
                struct sparc_stackf sf;
@@ -1780,7 +1780,7 @@ static void perf_callchain_user_32(struct perf_callchain_entry *entry,
 {
        unsigned long ufp;
 
-       ufp = regs->u_regs[UREG_I6] & 0xffffffffUL;
+       ufp = regs->u_regs[UREG_FP] & 0xffffffffUL;
        do {
                unsigned long pc;