summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/dumpstack.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/dumpstack.h')
-rw-r--r--arch/x86/kernel/dumpstack.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/kernel/dumpstack.h b/arch/x86/kernel/dumpstack.h
index 4fd1420..29e5f7c 100644
--- a/arch/x86/kernel/dumpstack.h
+++ b/arch/x86/kernel/dumpstack.h
@@ -29,4 +29,19 @@ struct stack_frame {
struct stack_frame *next_frame;
unsigned long return_address;
};
+
+static inline unsigned long rewind_frame_pointer(int n)
+{
+ struct stack_frame *frame;
+
+ get_bp(frame);
+
+#ifdef CONFIG_FRAME_POINTER
+ while (n--)
+ frame = frame->next_frame;
#endif
+
+ return (unsigned long)frame;
+}
+
+#endif /* DUMPSTACK_H */
OpenPOWER on IntegriCloud