| .. | .. |
|---|
| 12 | 12 | #include <linux/atomic.h> |
|---|
| 13 | 13 | #include <linux/kexec.h> |
|---|
| 14 | 14 | #include <linux/utsname.h> |
|---|
| 15 | +#include <linux/stop_machine.h> |
|---|
| 15 | 16 | |
|---|
| 16 | 17 | static char dump_stack_arch_desc_str[128]; |
|---|
| 17 | 18 | |
|---|
| .. | .. |
|---|
| 57 | 58 | log_lvl, dump_stack_arch_desc_str); |
|---|
| 58 | 59 | |
|---|
| 59 | 60 | print_worker_info(log_lvl, current); |
|---|
| 61 | + print_stop_info(log_lvl, current); |
|---|
| 60 | 62 | } |
|---|
| 61 | 63 | |
|---|
| 62 | 64 | /** |
|---|
| .. | .. |
|---|
| 71 | 73 | dump_stack_print_info(log_lvl); |
|---|
| 72 | 74 | } |
|---|
| 73 | 75 | |
|---|
| 74 | | -static void __dump_stack(void) |
|---|
| 76 | +static void __dump_stack(const char *log_lvl) |
|---|
| 75 | 77 | { |
|---|
| 76 | | - dump_stack_print_info(KERN_DEFAULT); |
|---|
| 77 | | - show_stack(NULL, NULL); |
|---|
| 78 | + dump_stack_print_info(log_lvl); |
|---|
| 79 | + show_stack(NULL, NULL, log_lvl); |
|---|
| 78 | 80 | } |
|---|
| 79 | 81 | |
|---|
| 80 | 82 | /** |
|---|
| .. | .. |
|---|
| 85 | 87 | #ifdef CONFIG_SMP |
|---|
| 86 | 88 | static atomic_t dump_lock = ATOMIC_INIT(-1); |
|---|
| 87 | 89 | |
|---|
| 88 | | -asmlinkage __visible void dump_stack(void) |
|---|
| 90 | +asmlinkage __visible void dump_stack_lvl(const char *log_lvl) |
|---|
| 89 | 91 | { |
|---|
| 90 | 92 | unsigned long flags; |
|---|
| 91 | 93 | int was_locked; |
|---|
| .. | .. |
|---|
| 115 | 117 | goto retry; |
|---|
| 116 | 118 | } |
|---|
| 117 | 119 | |
|---|
| 118 | | - __dump_stack(); |
|---|
| 120 | + __dump_stack(log_lvl); |
|---|
| 119 | 121 | |
|---|
| 120 | 122 | if (!was_locked) |
|---|
| 121 | 123 | atomic_set(&dump_lock, -1); |
|---|
| .. | .. |
|---|
| 123 | 125 | local_irq_restore(flags); |
|---|
| 124 | 126 | } |
|---|
| 125 | 127 | #else |
|---|
| 126 | | -asmlinkage __visible void dump_stack(void) |
|---|
| 128 | +asmlinkage __visible void dump_stack_lvl(const char *log_lvl) |
|---|
| 127 | 129 | { |
|---|
| 128 | | - __dump_stack(); |
|---|
| 130 | + __dump_stack(log_lvl); |
|---|
| 129 | 131 | } |
|---|
| 130 | 132 | #endif |
|---|
| 133 | +EXPORT_SYMBOL(dump_stack_lvl); |
|---|
| 134 | + |
|---|
| 135 | +asmlinkage __visible void dump_stack(void) |
|---|
| 136 | +{ |
|---|
| 137 | + dump_stack_lvl(KERN_DEFAULT); |
|---|
| 138 | +} |
|---|
| 131 | 139 | EXPORT_SYMBOL(dump_stack); |
|---|