11 #include <linux/errno.h>
12 #include <linux/list.h>
14 #include <linux/module.h>
28 static struct unwinder stack_reader = {
29 .name =
"stack-reader",
33 .next = &unwinder_list,
34 .prev = &unwinder_list,
48 static struct unwinder *curr_unwinder = &stack_reader;
51 .next = &stack_reader.
list,
52 .prev = &stack_reader.
list,
65 static struct unwinder *select_unwinder(
void)
69 if (list_empty(&unwinder_list))
73 if (best == curr_unwinder)
82 static int unwinder_enqueue(
struct unwinder *ops)
96 list_add(&ops->
list, entry);
116 ret = unwinder_enqueue(u);
118 curr_unwinder = select_unwinder();
119 spin_unlock_irqrestore(&unwinder_lock, flags);
148 if (unwinder_faulted) {
152 if (unwinder_faulted && !list_is_singular(&unwinder_list)) {
154 curr_unwinder = select_unwinder();
156 unwinder_faulted = 0;
159 spin_unlock_irqrestore(&unwinder_lock, flags);
162 curr_unwinder->
dump(task, regs, sp, ops, data);