]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sh/kernel/process.c
Merge branch 'ucc_geth' of master.kernel.org:/pub/scm/linux/kernel/git/leo/fsl-soc...
[linux-2.6-omap-h63xx.git] / arch / sh / kernel / process.c
index 6334a4c54c7cefeff3a5f2e7b03a37c81839b805..15ae322dbd741a594529835c2c543987125d37f9 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/kdebug.h>
 #include <linux/tick.h>
 #include <linux/reboot.h>
+#include <linux/fs.h>
 #include <asm/uaccess.h>
 #include <asm/mmu_context.h>
 #include <asm/pgalloc.h>
@@ -474,7 +475,6 @@ out:
 
 unsigned long get_wchan(struct task_struct *p)
 {
-       unsigned long schedule_frame;
        unsigned long pc;
 
        if (!p || p == current || p->state == TASK_RUNNING)
@@ -484,10 +484,13 @@ unsigned long get_wchan(struct task_struct *p)
         * The same comment as on the Alpha applies here, too ...
         */
        pc = thread_saved_pc(p);
+
+#ifdef CONFIG_FRAME_POINTER
        if (in_sched_functions(pc)) {
-               schedule_frame = (unsigned long)p->thread.sp;
+               unsigned long schedule_frame = (unsigned long)p->thread.sp;
                return ((unsigned long *)schedule_frame)[21];
        }
+#endif
 
        return pc;
 }