Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp810836ybx; Wed, 6 Nov 2019 08:45:38 -0800 (PST) X-Google-Smtp-Source: APXvYqzEDG7CiBXK6hPUMCtib1uRmLMYve/JQ5EgDjhZP6ZEtiiFp6UZulLkTvYv1KSHeCO31vPT X-Received: by 2002:a17:906:3582:: with SMTP id o2mr35455302ejb.54.1573058738456; Wed, 06 Nov 2019 08:45:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573058738; cv=none; d=google.com; s=arc-20160816; b=T41/miiOKCyOtrZRiLM3hn2W0pmsrRJTgDXEUzTFF8YtaRJ1YeMkZWp4N2m+vuBzmZ N3VSUoraC48anL1Z0UWiPurVL3dMmtltOqNS+shoXFtNAdxb8SI1WkO7I12/iJ7s9+TP L4752YDI32THMwagbwiebPb47u7WfG7fpMGzT0H8sn7aZjyIUOrbwypGueewILlGK9p9 5XtSCPEB3TUti7C1gJ4AQPaw3chOiVpe8LLz6l5FMj2Sq1MU8TLPa9lpF99XnqAblUMg 327DJdQcOYnJIDiAiqOCJ931Kge0w310UTfGwtcb8qKg6A2g1JR3QG65ONcBruM0xwkE BDqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=RnIAWuMyz7kDieVNrBUbl2Gvb5/kFTUXSVFfu5Y2MNA=; b=utZkwLrfbNUL2nQsFysnyi4DeCVSN2hSzaAUCaeaXPE1xHMVNzDJgFYZkEAvP7vmQh WPI8fy/KokhpREJRTgufTTzuiGfYXHXVqJ1JPKW0qUzdO+92U/aToVYe+UqsGqDKk0+h 99Sfbfr0GSEQ21QpgpytTbNz3oUoszJn4+JYyu6dBzn8Kdz95/ScXOmY+PEAU2+M57GD 4gDyozkt+G5yFasr2m4Bsqgl8hdON8j2chN0O1zMEZIzjqu9hHBJNjF3yeZXIaw+PplB ggw/vK8XhslJBnOmk3bkYSRlnCLxGNqJV54QYYxb/Zny+RIIdDXBsUCrW6iV8kiitDJv pjZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=onjprryL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e58si12564067eda.7.2019.11.06.08.45.14; Wed, 06 Nov 2019 08:45:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=onjprryL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728466AbfKFQoc (ORCPT + 99 others); Wed, 6 Nov 2019 11:44:32 -0500 Received: from mail-yw1-f68.google.com ([209.85.161.68]:42743 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727285AbfKFQob (ORCPT ); Wed, 6 Nov 2019 11:44:31 -0500 Received: by mail-yw1-f68.google.com with SMTP id z67so668830ywb.9 for ; Wed, 06 Nov 2019 08:44:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RnIAWuMyz7kDieVNrBUbl2Gvb5/kFTUXSVFfu5Y2MNA=; b=onjprryLGJm1op2xyFSo6LKEns+ebTE+WwtbI/KR7L/OuP/jFfOc8vreiDstWJZR5i /u34Zaq7MWWxqSd+SGkwtkDpk6tS0d1kTZDR2FdEyd5oj0PFBrd23iUcJfhicjIfPRhy zDhP2KmoNL1ZQuLofdscn7ApRDNAtL336tUiKYbvcHRxgSBAagFZWasEnyp1e1HLC7SV vCWBlOdp6ZIWKkwM3LLZD9WTkMHawaX303IekXO0G/MYohKPwMddc3BeRW3SwykXDyxV zbd3kZe8KO2SHQAFQnfg84pdBayvETXJemPlECfLm1cL1+X3jUEd9SHgDl5zzoVeYSMm 3FCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RnIAWuMyz7kDieVNrBUbl2Gvb5/kFTUXSVFfu5Y2MNA=; b=hofE2P19CvrafkmR0c//tmnmo30zQ91oOtK+KpwnM8v8I7ePoJsoB5ZD4th+VoN9lP 49qIXc+n1sgC55KdQvCbfmZmoasBJ9LisjE4Ng68VVEA2BPOhHVpWlE2y6uaEcZqnyha vpzge8JZlT3denjqd6KN9EWRrT+KXrxGDXGPZKvHjK4RgtINuTrllByn/vAtPN5esgMX 7/mvcZaz2I/sFv3P7ySsM7P1d/0/59Aj7DSKL3z3Zf/7sj2UP/I17yHyGFFBrEf/l7vB QarO1/7E89kqIWYQGmwgW+Q/++JlRGDDxLntdohzz7j7XQHZWyUOZeaZ2LuJcwDNRm0X ccrQ== X-Gm-Message-State: APjAAAV8FZnSuGQbyUMG7Gm7J9nU4iXT2ckessohOOVIARXfUR8e/LFc H0cflQHGsF/cHZ3cwlh6r7xlUKoHkpWur+1KgMg= X-Received: by 2002:a81:8415:: with SMTP id u21mr2283731ywf.129.1573058670927; Wed, 06 Nov 2019 08:44:30 -0800 (PST) MIME-Version: 1.0 References: <20191106030542.868541-1-dima@arista.com> <20191106030542.868541-44-dima@arista.com> <20191106081541.soxefwyvu3o72tqg@pathway.suse.cz> In-Reply-To: <20191106081541.soxefwyvu3o72tqg@pathway.suse.cz> From: Max Filippov Date: Wed, 6 Nov 2019 08:44:19 -0800 Message-ID: Subject: Re: [PATCH 43/50] xtensa: Add show_stack_loglvl() To: Petr Mladek Cc: Dmitry Safonov , LKML , Dmitry Safonov <0x7f454c46@gmail.com>, Andrew Morton , Greg Kroah-Hartman , Ingo Molnar , Jiri Slaby , Sergey Senozhatsky , Steven Rostedt , Tetsuo Handa , Chris Zankel , "open list:TENSILICA XTENSA PORT (xtensa)" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 6, 2019 at 12:15 AM Petr Mladek wrote: > > > for (i = 0; i < kstack_depth_to_print; i++) { > > > if (kstack_end(sp)) > > > break; > > > - pr_cont(" %08lx", *sp++); > > > + printk("%s %08lx", loglvl, *sp++); > > KERN_CONT can be combined with any other loglevel. > So you could keep using pr_cont() together with explicit loglevel: > > pr_cont("%s %08lx", loglvl, *sp++); > > It should fix the problems reported below. > > Well, the preferred solution would be to snprintf() the continuous > line into a temporary buffer. And printk() it when it is complete. > pr_cont() is not reliable when more CPUs print at the same time. Good point. Let me do this cleanup. -- Thanks. -- Max