summaryrefslogtreecommitdiffstats
path: root/arch/arc/include/asm/stacktrace.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-03-04 09:27:22 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-03-04 09:27:22 -0800
commitf2cb4777f67222da92bdf473ed913ac7bb3873cd (patch)
tree19c2c2a909d8cdddd0ad5b5e1130702acb4de5b4 /arch/arc/include/asm/stacktrace.h
parent97754e3c5ae814a308c5ddfb08f8d2dc3dcb1b47 (diff)
parent3240dd57e533da94998029af6e17008a1806c665 (diff)
Merge tag 'arc-4.0-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Pull ARC fixes from Vineet Gupta: - Fix for /proc/<pid>/maps "stack" vma annotation - sched stats not printing correct sleeping task PC - perf not reporting page faults * tag 'arc-4.0-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: Fix thread_saved_pc() ARC: Fix KSTK_ESP() ARC: perf: Enable generic software events ARC: Make arc_unwind_core accessible externally
Diffstat (limited to 'arch/arc/include/asm/stacktrace.h')
-rw-r--r--arch/arc/include/asm/stacktrace.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arc/include/asm/stacktrace.h b/arch/arc/include/asm/stacktrace.h
new file mode 100644
index 00000000000..b29b6064ea1
--- /dev/null
+++ b/arch/arc/include/asm/stacktrace.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2014-15 Synopsys, Inc. (www.synopsys.com)
+ * Copyright (C) 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_STACKTRACE_H
+#define __ASM_STACKTRACE_H
+
+#include <linux/sched.h>
+
+/**
+ * arc_unwind_core - Unwind the kernel mode stack for an execution context
+ * @tsk: NULL for current task, specific task otherwise
+ * @regs: pt_regs used to seed the unwinder {SP, FP, BLINK, PC}
+ * If NULL, use pt_regs of @tsk (if !NULL) otherwise
+ * use the current values of {SP, FP, BLINK, PC}
+ * @consumer_fn: Callback invoked for each frame unwound
+ * Returns 0 to continue unwinding, -1 to stop
+ * @arg: Arg to callback
+ *
+ * Returns the address of first function in stack
+ *
+ * Semantics:
+ * - synchronous unwinding (e.g. dump_stack): @tsk NULL, @regs NULL
+ * - Asynchronous unwinding of sleeping task: @tsk !NULL, @regs NULL
+ * - Asynchronous unwinding of intr/excp etc: @tsk !NULL, @regs !NULL
+ */
+notrace noinline unsigned int arc_unwind_core(
+ struct task_struct *tsk, struct pt_regs *regs,
+ int (*consumer_fn) (unsigned int, void *),
+ void *arg);
+
+#endif /* __ASM_STACKTRACE_H */