^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef _LINUX_UNWINDER_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define _LINUX_UNWINDER_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #include <asm/stacktrace.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) struct unwinder {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) const char *name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) struct list_head list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) int rating;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) void (*dump)(struct task_struct *, struct pt_regs *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) unsigned long *, const struct stacktrace_ops *, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) extern int unwinder_init(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) extern int unwinder_register(struct unwinder *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) extern void unwind_stack(struct task_struct *, struct pt_regs *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) unsigned long *, const struct stacktrace_ops *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) extern void stack_reader_dump(struct task_struct *, struct pt_regs *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) unsigned long *, const struct stacktrace_ops *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) * Used by fault handling code to signal to the unwinder code that it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) * should switch to a different unwinder.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) extern int unwinder_faulted;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #endif /* _LINUX_UNWINDER_H */