1 // SPDX-License-Identifier: GPL-2.0
3 * arch/ia64/kernel/stacktrace.c
5 * Stack trace management functions
8 #include <linux/sched.h>
9 #include <linux/stacktrace.h>
10 #include <linux/module.h>
13 ia64_do_save_stack(struct unw_frame_info
*info
, void *arg
)
15 struct stack_trace
*trace
= arg
;
17 int skip
= trace
->skip
;
19 trace
->nr_entries
= 0;
21 unw_get_ip(info
, &ip
);
25 trace
->entries
[trace
->nr_entries
++] = ip
;
26 if (trace
->nr_entries
== trace
->max_entries
)
30 } while (unw_unwind(info
) >= 0);
34 * Save stack-backtrace addresses into a stack_trace buffer.
36 void save_stack_trace(struct stack_trace
*trace
)
38 unw_init_running(ia64_do_save_stack
, trace
);
40 EXPORT_SYMBOL(save_stack_trace
);