Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2941365pxb; Mon, 25 Jan 2021 02:48:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzqQM5Dbon95BbDZeRIkUEZw5NsIt5hDUrlT1ho9XDIji/7mcAurPTuAJDpzch6tizyXLrE X-Received: by 2002:a17:907:3fa6:: with SMTP id hr38mr996119ejc.24.1611571682077; Mon, 25 Jan 2021 02:48:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611571682; cv=none; d=google.com; s=arc-20160816; b=RgPCX9m0BwIZQQ8J7pbVz+S7f/WkgNpJheqoDwPyP5OToV704jbynQRJ6CiJJxU1R6 SN221WtYiDvWGsm+ep5QKoewtJQ5rguv1wcZVEgmqs2XfhdEviJqDSg36063F6VKaq2l eGWzIDdUw3CH+S8irIAU8julxZEKP2jVhsFAu8BL7/taxsXvHGeblwLm6EHsceiJmbHG yieIcSlcVXZS4wwYIGH8Manw3/B+eEKid4MSr1aqYFNTHPEKKYIYZ9+qgS5m7D73eXLy IPDYp3V9qu4QAH0QGJnYz0Cc0LzQhQmDz56qR9YpaYOuLIA0hTVRBGtA+NUyUh9pqZ5R 7WwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iMGBNmPvE4v1jywfgHxZnsC9PInWaaImOpYiuSDeYH8=; b=Tr1W4yuFdxG1QxTkSKca5OiUhUZ3GV4XYLkW9EWna9COUWmluqlTL6VVph4RowjG5T inPfiitV+TAlgIipad4ITzqn/BVhsoo8u1ml4bggXsyo/BFbpBdL8dxuK2Wy380wK0Bu 2CVRBi1uUg/QFMehZnR5djUTuFmoyuN7Yd+m3YVV1uDKyi/6hrNuIywAgFvmgKwdRr1p uikssQ2UxKXvBMDxzG7k+fdELBSYRXAHzlF8SHZovdnZg/WRctkkN/mCz7y3hknPs9Wh 1ex7mlSRzTVdRghXhKib7YS3nnG8DYompMC06ZqOkgR6CnZUEf4hrrdcY9we5GZEHBJD vS9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XGpRgv3U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o25si1947052eja.732.2021.01.25.02.47.38; Mon, 25 Jan 2021 02:48:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XGpRgv3U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727531AbhAYKoA (ORCPT + 99 others); Mon, 25 Jan 2021 05:44:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727496AbhAYKie (ORCPT ); Mon, 25 Jan 2021 05:38:34 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24625C06174A for ; Mon, 25 Jan 2021 02:37:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=iMGBNmPvE4v1jywfgHxZnsC9PInWaaImOpYiuSDeYH8=; b=XGpRgv3UJ1zJBW1lmzkCciStOJ Fp22GXksW20qouvjnkQyOJRz7xJ/3hGCev25dsQRZyK/godEYPjEsGRwphqnRH5iY36uiHOXF5YYO wfZ9qYFYEdIe9KbG9A3ZzKFLW89p7SQzfmydp3NSQ3fDzrUzZ2/FednXm54Jl4a9FJbd1A3M3Ao5a hdz912DQaJ0cw97ygdFs9UXvjl1I4lgKmwroHS7zEzbUiJgH7haBcPFJs+Mfu+O3VNYkXMjRwRDJL PS8Bf9tdx6drZsIMe+gOcGTMfqWY7ollFuNRcaxftHUXWMT6UZQkQgfSwvXpohLwsULrZaQIfU84L aDLSzj1A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1l3zF1-0045UB-A4; Mon, 25 Jan 2021 10:37:15 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 61EB53010C8; Mon, 25 Jan 2021 11:37:02 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4369D2B0615C6; Mon, 25 Jan 2021 11:37:02 +0100 (CET) Date: Mon, 25 Jan 2021 11:37:02 +0100 From: Peter Zijlstra To: Qais Yousef Cc: Petr Mladek , Sergey Senozhatsky , Thomas Gleixner , Steven Rostedt , John Ogness , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] printk: Add new pr_*_deferred_once() variants Message-ID: References: <20210123233741.3614408-1-qais.yousef@arm.com> <20210123233741.3614408-2-qais.yousef@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210123233741.3614408-2-qais.yousef@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 23, 2021 at 11:37:40PM +0000, Qais Yousef wrote: > To allow users in code where printk is not allowed. > > Signed-off-by: Qais Yousef > --- > include/linux/printk.h | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/include/linux/printk.h b/include/linux/printk.h > index fe7eb2351610..92c0978c7b44 100644 > --- a/include/linux/printk.h > +++ b/include/linux/printk.h > @@ -480,21 +480,45 @@ extern int kptr_restrict; > printk_once(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) > /* no pr_cont_once, don't do that... */ > > +#define pr_emerg_deferred_once(fmt, ...) \ > + printk_deferred_once(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) > +#define pr_alert_deferred_once(fmt, ...) \ > + printk_deferred_once(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) > +#define pr_crit_deferred_once(fmt, ...) \ > + printk_deferred_once(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) > +#define pr_err_deferred_once(fmt, ...) \ > + printk_deferred_once(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) > +#define pr_warn_deferred_once(fmt, ...) \ > + printk_deferred_once(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) > +#define pr_notice_deferred_once(fmt, ...) \ > + printk_deferred_once(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) > +#define pr_info_deferred_once(fmt, ...) \ > + printk_deferred_once(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) > +/* no pr_cont_deferred_once, don't do that... */ I absolutely detest this.. the whole _deferred thing is an abomination. We should be very close to printk not needing this anymore, printk people?