From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F152C4346E for ; Thu, 24 Sep 2020 04:24:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1517720888 for ; Thu, 24 Sep 2020 04:24:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="OCh/hxfj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="wNGr7Z0w" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726689AbgIXEYR (ORCPT ); Thu, 24 Sep 2020 00:24:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726504AbgIXEYR (ORCPT ); Thu, 24 Sep 2020 00:24:17 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60EAFC0613CE for ; Wed, 23 Sep 2020 21:24:17 -0700 (PDT) Date: Thu, 24 Sep 2020 06:24:14 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1600921455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cfpS9DPPY8rOz0UxqYMocgg1xPkcu8YAdrj/3nL8k6c=; b=OCh/hxfjVuXH6dPm4RKc47u3DaRFeuclZnta0cKydzSycbMWPpLNyzEMJyfpJBjE+QriMD 4eOYpJtqAueQtBFQDh4bCN8cShLNlXat1CnT+0CBU6pFimCOF9tM8m4nGaJrbVii241FSf zDnNkJhSkLeyDRmw36gelEtqthKFdWSlWEnEvRMNjDuxUR11/b95pHGjMlDo9BauTKbpWd Gn1ba1NDcaoiv10fFruaoRX+BKo7ytEZftY8/5pbSlWt2sLETNOtceRkxbgufAgxURDdrX UujRlN9wyOP1Pj2mjyE4WjV2lZmhVuXCKnIiNRJ+eQVmaodFhUmqQwnhjYi6Zw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1600921455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cfpS9DPPY8rOz0UxqYMocgg1xPkcu8YAdrj/3nL8k6c=; b=wNGr7Z0wp/okPXcT0bLmJxKPBr+FDN5iiwBLqbWiexHf58TRzRtDkWQy955XKI5Zjg2VNP fYRnP7cxrWr9HpAg== From: "Ahmed S. Darwish" To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , John Ogness , Linus Torvalds , Thomas Gleixner , Prarit Bhargava , Mark Salyzyn , Chunyan Zhang , Orson Zhai , Changki Kim , Sergey Senozhatsky , linux-kernel@vger.kernel.org Subject: Re: [RFC 2/2] printk: Add more information about the printk caller Message-ID: <20200924042414.GA6039@lx-t490> References: <20200923135617.27149-1-pmladek@suse.com> <20200923135617.27149-3-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200923135617.27149-3-pmladek@suse.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 23, 2020 at 03:56:17PM +0200, Petr Mladek wrote: ... > > -static inline u32 printk_caller_id(void) > +static enum printk_caller_ctx get_printk_caller_ctx(void) > +{ > + if (in_nmi()) > + return printk_ctx_nmi; > + > + if (in_irq()) > + return printk_ctx_hardirq; > + > + if (in_softirq()) > + return printk_ctx_softirq; > + > + return printk_ctx_task; > +} > + in_softirq() here will be true for both softirq contexts *and* BH-disabled regions. Did you mean in_serving_softirq() instead? Thanks, -- Ahmed S. Darwish Linutronix GmbH