summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/stacktrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include/asm/stacktrace.h')
-rw-r--r--arch/arm/include/asm/stacktrace.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/include/asm/stacktrace.h b/arch/arm/include/asm/stacktrace.h
index 360f0d2406bf..f80a85b091d6 100644
--- a/arch/arm/include/asm/stacktrace.h
+++ b/arch/arm/include/asm/stacktrace.h
@@ -26,6 +26,13 @@ struct stackframe {
#endif
};
+static inline bool on_thread_stack(void)
+{
+ unsigned long delta = current_stack_pointer ^ (unsigned long)current->stack;
+
+ return delta < THREAD_SIZE;
+}
+
static __always_inline
void arm_get_current_stackframe(struct pt_regs *regs, struct stackframe *frame)
{