Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1045387imm; Thu, 31 May 2018 14:14:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLlC4OlrwFVik/PBzSzpHobMV7XDibOCtutvx3V75YUtwNp4JRlos30Icv36ctiPN8uUnff X-Received: by 2002:a17:902:8303:: with SMTP id bd3-v6mr8348666plb.290.1527801243780; Thu, 31 May 2018 14:14:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527801243; cv=none; d=google.com; s=arc-20160816; b=0KAANixLe7v0b6BDgdUHy5CBUGoWcRNcOVBNJsElmczauYMzWJuIiTBxqiat1Gfc+E 37zrngGeOTmQlboC4thmgrwDTWDhk6D8GnqosRDvjzH9jIg1KDKTNQicYjkp5a36SMMY i6eHdM9Mo9ynLHkOAckP+qUMaNrNJUKBygxTdJT93qJHoYiXxlnIbM2Pk4KrChtOJjmQ unfEukd/pJWGWIdKkXneCDHRaqCNGU0468QVdsZrEU6EwMuCNY0wBEMoHxdQ2MuJgcg4 eigoI2vo7UTJF41rLIJ+XkJfC5hlGxXWGAB53r+oFJL3DnVUziASF1Ev2TFcyjXKlQaW e9XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=G1QZJT3x+YTNMuxvw4QQ8E+HTrdZlGuVXgfLe3jMIcA=; b=sc5dKyJtGDyxKDACSqAvnmhgf1mGNPCnaH2+Nd3O74gmpXSnsaE3UO0i8gN8L5StXl 5Nd7jQPorUJyQN/rykQ5lzJFNtdA76AEeJjyncsh3zhRUdPO9LdhxQx34gQpIpACf6ZS ebMm6gcocboyVXW5/5VRuMVf5+Qw4fP4OETpuEKu0jJrU0rIy0EAPHZnG+WVIyBwoxRi qiK1mjQL7sJ2BkRSYOr4qDTcueCEQRmAz0ORMpzw/RynUrx80pQud/uNalDZTFVFxhz/ o4VtH4BxdWzvoa1tmtHtmOHnx3ZQpr01Y0Y22u5AjMHxFc7ecgF5idSdYEkAzehRo5Q6 98jQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s23-v6si14637073pfi.105.2018.05.31.14.13.48; Thu, 31 May 2018 14:14:03 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751170AbeEaVNM (ORCPT + 99 others); Thu, 31 May 2018 17:13:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:55928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750795AbeEaVNL (ORCPT ); Thu, 31 May 2018 17:13:11 -0400 Received: from vmware.local.home (50-204-119-2-static.hfc.comcastbusiness.net [50.204.119.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4391C208A1; Thu, 31 May 2018 21:13:10 +0000 (UTC) Date: Thu, 31 May 2018 17:13:08 -0400 From: Steven Rostedt To: Geert Uytterhoeven Cc: Stephen Boyd , Linus Torvalds , Petr Mladek , baijiaju1990@gmail.com, Bjorn Helgaas , SergeySenozhatsky , Al Viro , Greg Kroah-Hartman , Jonathan Corbet , Linux Kernel Mailing List , Thomas Gleixner , Geert Uytterhoeven , Michael Turquette Subject: Re: Can printk() sleep at runtime? Message-ID: <20180531171308.08474a70@vmware.local.home> In-Reply-To: References: <20180531100457.fncibp5cxdozvbjh@pathway.suse.cz> <152777998940.144038.2717154952249020053@swboyd.mtv.corp.google.com> X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 31 May 2018 18:42:48 +0200 Geert Uytterhoeven wrote: > Hi Stephen, > > On Thu, May 31, 2018 at 5:19 PM, Stephen Boyd wrote: > > Quoting Linus Torvalds (2018-05-31 07:32:10) > >> On Thu, May 31, 2018 at 5:05 AM Petr Mladek wrote: > >> > Anyway, we need to fix or remove this format. vsprintf-like functions > >> > are called in any context and nobody expect that they might sleep. > >> > >> Ack. I guess the argument is that "%pCr" is rare, and none of *those* > >> users may care, but I do think that doing things wrong as-is. > >> > >> It's too subtle to have to know you're in a particular locking context > >> when you use a particular %p modifier. > > > > Agreed. Removing the format seems to be the best approach. It looks like > > only Geert has used it in the last few years and it hasn't been used > > much otherwise. > > Indeed, just 3 users (the broadcom one isn't mine): > drivers/clk/renesas/renesas-cpg-mssr.c > drivers/thermal/broadcom/bcm2835_thermal.c > drivers/tty/serial/sh-sci.c > > Alternatively, can we have a special version __clk_get_rate() that just > returns clk->core->rate? > Or would that be too inaccurate in the presence of CLK_GET_RATE_NOCACHE? > The function could still return 0 in case the flag is set. If it's only used in three locations, I think it would be better to simply remove it from vsprintf() and have the three callers call clk_get_rate() directly. -- Steve