diff options
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 376914e2869d..70b4b94a0eca 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/rculist.h> | 43 | #include <linux/rculist.h> |
44 | #include <linux/poll.h> | 44 | #include <linux/poll.h> |
45 | #include <linux/irq_work.h> | 45 | #include <linux/irq_work.h> |
46 | #include <linux/utsname.h> | ||
46 | 47 | ||
47 | #include <asm/uaccess.h> | 48 | #include <asm/uaccess.h> |
48 | 49 | ||
@@ -2849,4 +2850,21 @@ void kmsg_dump_rewind(struct kmsg_dumper *dumper) | |||
2849 | raw_spin_unlock_irqrestore(&logbuf_lock, flags); | 2850 | raw_spin_unlock_irqrestore(&logbuf_lock, flags); |
2850 | } | 2851 | } |
2851 | EXPORT_SYMBOL_GPL(kmsg_dump_rewind); | 2852 | EXPORT_SYMBOL_GPL(kmsg_dump_rewind); |
2853 | |||
2854 | /** | ||
2855 | * dump_stack_print_info - print generic debug info for dump_stack() | ||
2856 | * @log_lvl: log level | ||
2857 | * | ||
2858 | * Arch-specific dump_stack() implementations can use this function to | ||
2859 | * print out the same debug information as the generic dump_stack(). | ||
2860 | */ | ||
2861 | void dump_stack_print_info(const char *log_lvl) | ||
2862 | { | ||
2863 | printk("%sCPU: %d PID: %d Comm: %.20s %s %s %.*s\n", | ||
2864 | log_lvl, raw_smp_processor_id(), current->pid, current->comm, | ||
2865 | print_tainted(), init_utsname()->release, | ||
2866 | (int)strcspn(init_utsname()->version, " "), | ||
2867 | init_utsname()->version); | ||
2868 | } | ||
2869 | |||
2852 | #endif | 2870 | #endif |