dump_stack: unify debug information printed by show_regs()
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / kernel / printk.c
index 73a96def4804294584129041c4fc47541d64ec50..e10ad515901f60d763484c1b75049e79ed184c9f 100644 (file)
@@ -2893,4 +2893,20 @@ void dump_stack_print_info(const char *log_lvl)
                       log_lvl, dump_stack_arch_desc_str);
 }
 
+/**
+ * show_regs_print_info - print generic debug info for show_regs()
+ * @log_lvl: log level
+ *
+ * show_regs() implementations can use this function to print out generic
+ * debug information.
+ */
+void show_regs_print_info(const char *log_lvl)
+{
+       dump_stack_print_info(log_lvl);
+
+       printk("%stask: %p ti: %p task.ti: %p\n",
+              log_lvl, current, current_thread_info(),
+              task_thread_info(current));
+}
+
 #endif