From: Alex Thorlton Date: Fri, 7 Jun 2013 00:08:38 +0000 (+1000) Subject: panic: add cpu/pid to warn_slowpath_common in WARNING printk()s X-Git-Tag: next-20130607~2^2~256 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=decb684549f0db9e166b9faa46077f2e56e30725;p=karo-tx-linux.git panic: add cpu/pid to warn_slowpath_common in WARNING printk()s Add the cpu/pid that called WARN() so that the stack traces can be matched up with the WARNING messages. Signed-off-by: Alex Thorlton Reviewed-by: Robin Holt Cc: Stephen Boyd Cc: Vikram Mulukutla Cc: Rusty Russell Cc: Tejun Heo Signed-off-by: Andrew Morton --- diff --git a/kernel/panic.c b/kernel/panic.c index 167ec097ce8b..aaa0b7c7f51b 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -399,8 +399,9 @@ struct slowpath_args { static void warn_slowpath_common(const char *file, int line, void *caller, unsigned taint, struct slowpath_args *args) { - printk(KERN_WARNING "------------[ cut here ]------------\n"); - printk(KERN_WARNING "WARNING: at %s:%d %pS()\n", file, line, caller); + pr_warn("------------[ cut here ]------------\n"); + pr_warn("WARNING: CPU: %d PID: %d at %s:%d %pS()\n", ' + raw_smp_processor_id(), current->pid, file, line, caller); if (args) vprintk(args->fmt, args->args);