sched/x86: Add 'struct inactive_task_frame' to better document the sleeping task...
[linux-2.6-block.git] / arch / x86 / include / asm / stacktrace.h
index 0944218af9e279d631af9f03506a9672c4443c6d..7646fb2772f801a0950ec7c9ecbbcf4122e9ebcd 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <linux/uaccess.h>
 #include <linux/ptrace.h>
+#include <asm/switch_to.h>
 
 extern int kstack_depth_to_print;
 
@@ -70,8 +71,7 @@ stack_frame(struct task_struct *task, struct pt_regs *regs)
                return bp;
        }
 
-       /* bp is the last reg pushed by switch_to */
-       return *(unsigned long *)task->thread.sp;
+       return ((struct inactive_task_frame *)task->thread.sp)->bp;
 }
 #else
 static inline unsigned long