diff --git a/arch/sh/oprofile/backtrace.c b/arch/sh/oprofile/backtrace.c index 2bc74de23f08ddb425c086999af359874416e3b6..37f3a75ea6cbf5d18f28d41e2789fe3997a6df19 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,