Преглед на файлове

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>
Paul Mundt преди 18 години
родител
ревизия
b652c23cb0
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      arch/sh/kernel/process.c

+ 3 - 2
arch/sh/kernel/process.c

@@ -470,9 +470,10 @@ unsigned long get_wchan(struct task_struct *p)
 	 */
 	 */
 	pc = thread_saved_pc(p);
 	pc = thread_saved_pc(p);
 	if (in_sched_functions(pc)) {
 	if (in_sched_functions(pc)) {
-		schedule_frame = ((unsigned long *)(long)p->thread.sp)[1];
-		return (unsigned long)((unsigned long *)schedule_frame)[1];
+		schedule_frame = (unsigned long)p->thread.sp;
+		return ((unsigned long *)schedule_frame)[21];
 	}
 	}
+
 	return pc;
 	return pc;
 }
 }