aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/process.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-12-08 03:46:29 -0500
committerPaul Mundt <lethal@linux-sh.org>2006-12-11 18:42:08 -0500
commitb652c23cb0f7808bedb5442c416d91705a465c67 (patch)
treed18dbf1fd11c5ad08e7dc1ef2cb97a774bb92d45 /arch/sh/kernel/process.c
parentdc34d312c7b25d5d0f54c16d143a9526936e5d38 (diff)
sh: Fix get_wchan().
Some time ago the schedule frame size changed and we failed to reflect this in get_wchan() at the time. This first popped up as a problem on SH7751R where schedule_frame ended up being unaligned and generating an unaligned trap. This fixes it up again.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/process.c')
-rw-r--r--arch/sh/kernel/process.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index 7347f6afa030..486c06e18033 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -470,9 +470,10 @@ unsigned long get_wchan(struct task_struct *p)
470 */ 470 */
471 pc = thread_saved_pc(p); 471 pc = thread_saved_pc(p);
472 if (in_sched_functions(pc)) { 472 if (in_sched_functions(pc)) {
473 schedule_frame = ((unsigned long *)(long)p->thread.sp)[1]; 473 schedule_frame = (unsigned long)p->thread.sp;
474 return (unsigned long)((unsigned long *)schedule_frame)[1]; 474 return ((unsigned long *)schedule_frame)[21];
475 } 475 }
476
476 return pc; 477 return pc;
477} 478}
478 479