diff options
author | David McCullough <david_mccullough@au.securecomputing.com> | 2007-07-26 04:46:07 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-07-26 04:46:07 -0400 |
commit | c64ac9f0581a80b6200846e7007a33c3b24ef745 (patch) | |
tree | 2debaa0d6163c2052ba873f0bf07febac6013140 /arch | |
parent | 1f25756a11d662a986553754bf398ccc38f3925e (diff) |
sh: fix get_wchan() for SH kernels without framepointers
Do not follow the frame pointers (/proc/X/task/1/stat) unless we were
compiled with them.
Signed-off-by: David McCullough <david_mccullough@au.securecomputing.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-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 | } |