summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-10-27 09:58:22 +0200
committerPaul Mundt <lethal@linux-sh.org>2010-10-27 09:58:22 +0200
commitd1ba71f7645696020864fe3cea3049befbe50408 (patch)
treef870feb1903ed3c46ffe825c5a5b394175a757f9 /arch
parentsh: oprofile: Fix up and extend op_name_from_perf_id(). (diff)
downloadlinux-d1ba71f7645696020864fe3cea3049befbe50408.tar.xz
linux-d1ba71f7645696020864fe3cea3049befbe50408.zip
sh64: oprofile: Fix up kernel stack pointer size mismatch.
For the backtrace code its assumed that the stack pointer is 32-bits, which is not the case with the sh64 registers. Use the shared kernel_stack_pointer() helper to get at the actual register, which already takes care of the necessary typecasting. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/oprofile/backtrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/oprofile/backtrace.c b/arch/sh/oprofile/backtrace.c
index 2bc74de23f08..37f3a75ea6cb 100644
--- a/arch/sh/oprofile/backtrace.c
+++ b/arch/sh/oprofile/backtrace.c
@@ -91,7 +91,7 @@ void sh_backtrace(struct pt_regs * const regs, unsigned int depth)
if (depth > backtrace_limit)
depth = backtrace_limit;
- stackaddr = (unsigned long *)regs->regs[15];
+ stackaddr = (unsigned long *)kernel_stack_pointer(regs);
if (!user_mode(regs)) {
if (depth)
unwind_stack(NULL, regs, stackaddr,