diff options
Diffstat (limited to 'arch/sh/kernel/process.c')
-rw-r--r-- | arch/sh/kernel/process.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 6334a4c54c7c..3a1783010c03 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -474,7 +474,6 @@ out: | |||
474 | 474 | ||
475 | unsigned long get_wchan(struct task_struct *p) | 475 | unsigned long get_wchan(struct task_struct *p) |
476 | { | 476 | { |
477 | unsigned long schedule_frame; | ||
478 | unsigned long pc; | 477 | unsigned long pc; |
479 | 478 | ||
480 | if (!p || p == current || p->state == TASK_RUNNING) | 479 | if (!p || p == current || p->state == TASK_RUNNING) |
@@ -484,10 +483,13 @@ unsigned long get_wchan(struct task_struct *p) | |||
484 | * The same comment as on the Alpha applies here, too ... | 483 | * The same comment as on the Alpha applies here, too ... |
485 | */ | 484 | */ |
486 | pc = thread_saved_pc(p); | 485 | pc = thread_saved_pc(p); |
486 | |||
487 | #ifdef CONFIG_FRAME_POINTER | ||
487 | if (in_sched_functions(pc)) { | 488 | if (in_sched_functions(pc)) { |
488 | schedule_frame = (unsigned long)p->thread.sp; | 489 | unsigned long schedule_frame = (unsigned long)p->thread.sp; |
489 | return ((unsigned long *)schedule_frame)[21]; | 490 | return ((unsigned long *)schedule_frame)[21]; |
490 | } | 491 | } |
492 | #endif | ||
491 | 493 | ||
492 | return pc; | 494 | return pc; |
493 | } | 495 | } |