Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp809588imm; Thu, 31 May 2018 09:45:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKbFivy8U4nRuYcdf/LK7vCYUfmsNJaHhBPBqv777RTahSbJNOKsuAKQfeIW5x2GeLxYko3 X-Received: by 2002:a63:6fce:: with SMTP id k197-v6mr1864944pgc.307.1527785120748; Thu, 31 May 2018 09:45:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527785120; cv=none; d=google.com; s=arc-20160816; b=oJcTXBo9zn1+nSGXg60AGyUfCuLvwULg+vXe07Tdc6niU3KdRa9YfIk1/lBukPBZ1S 3+XUboj3YOQD5YrozMkdMs6hqUdAt7k5+D8JXxESWDhQLscxU+gS5O5ci6KkcNL2IOgg hpIGw4ouNDAxcewy0tN3oQUfe/F4/mjccsbTkbwVkI3EC+lbiHj9UUef5tqw/+k2jg1J fW76ov8yI7pmkUPasCjnj+9qrj6KJCPo4xjXkmFmXhcankq0gc1hhGzk1m7tprsSBCIu evVi9wAm3fkUTGcXLSSD1Y6YgSAdSeIduR0xPi0NI/o0GQNk+Kxc2vevh2tB1jRdoZoF SS9g== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=vYETSNpAKNUxlyxX+0/EO/W/xrSXWgyjgwFIq0vM5GQ=; b=BIJ9+HG2hwkQJPJUMswCSOSMHfOPC9vJLNjFo2RGeOyqRTXzmKfmMgkYZ2Bcaf3kyW goyt1KLZ3ggliGJ4j8S3BINViLJqIr9tZtho+7uPr/jnNvfF8n9t/bY0zWcaHRqId+HO 6uIG5lx7NjydnX2wP8i3BFDvTitaaxcZHTWjwohmoZf1nLr47btTezi+6ietn9nKC2QQ l9khw3s/RuIf0QM2VoneKV03yide8HFHnofv4x7A8kMj7lkPEcRgBWrUKlsMJWEvVEH7 dy4fNvftcE/slLXUdOFgexZLD91sjBIm/G0gq2BM7BkzDsYFEt9DW8mlFDwVZqelek7n VJ4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Kf3YPGeo; 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 u123-v6si8176461pfc.178.2018.05.31.09.45.06; Thu, 31 May 2018 09:45:20 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Kf3YPGeo; 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 S1755881AbeEaQmx (ORCPT + 99 others); Thu, 31 May 2018 12:42:53 -0400 Received: from mail-vk0-f46.google.com ([209.85.213.46]:36891 "EHLO mail-vk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755807AbeEaQmu (ORCPT ); Thu, 31 May 2018 12:42:50 -0400 Received: by mail-vk0-f46.google.com with SMTP id m144-v6so13736769vke.4 for ; Thu, 31 May 2018 09:42:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=vYETSNpAKNUxlyxX+0/EO/W/xrSXWgyjgwFIq0vM5GQ=; b=Kf3YPGeoL6hSS29KP8RgLAOKAfO3d3qchAF6NRiVMi47GywUhyQhirW6mIQb7Hg/RD VZzR0Afzli2sMeIiswiIZ/YVShx/9lwO+WdoiVSRBfbWXx10p85FdPB50SawRCgKcgvz 9Fnu5D6ydez2zd1zCIemqdS8szuBWBavUV9Vgt10bNG/5v0+KWOAieqlQEsKW4T4eK57 0Rc/9FZGIrN3JiewqES1VCEKuJPK6Cng53yZ0uL8nPWyILI4zgYxMMTwX/4s4+fCdODi 41JhHm28ldoHDO31VYfqtCBEoUg52pUUblXDxWzXNNpNYxcHx2a8US7kWcLkqiGuA7X0 wW1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=vYETSNpAKNUxlyxX+0/EO/W/xrSXWgyjgwFIq0vM5GQ=; b=mFOFYoM4AlZX0iX417o89aIzGZFfLnmay0G4hFAyeDpkpgqMkHL7/Ri4t79/7+NPxW CyzmI5AQsA8lSzAzCdIBRsWVneHj/I79E6+7DLeyHKHH6LsTndPaeu/oz6E8v/dUpiI0 bNXAx21RX66maq2ll7xQyq8AtCAsJmXr65q1+N5xV8fsK3kNzAya8g9RtGmLn2cXVeV5 5HDOARqxjtAIUpkE1/itkne9ZUtifqmQRq/dfWclNJhpUvTInHD64KlfJbJS2Xq8ECVB O3MAmkmfn/g9XtoXwdqmn5vBeoiCEomw3XyDiSc83Qq6tld8cQ6mDccsQciTqDAbsTpi dVPQ== X-Gm-Message-State: APt69E0LFuwI3WR6ycGbo+3hR42SEdn9vL0Ge6UtNwmTXuRGHEiAf3o3 YaiyjHWBRY8SnnGW0nViTYyXDkpyX0qTHjJl+CY= X-Received: by 2002:a1f:b508:: with SMTP id e8-v6mr4517443vkf.125.1527784969299; Thu, 31 May 2018 09:42:49 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:7a0a:0:0:0:0:0 with HTTP; Thu, 31 May 2018 09:42:48 -0700 (PDT) In-Reply-To: <152777998940.144038.2717154952249020053@swboyd.mtv.corp.google.com> References: <20180531100457.fncibp5cxdozvbjh@pathway.suse.cz> <152777998940.144038.2717154952249020053@swboyd.mtv.corp.google.com> From: Geert Uytterhoeven Date: Thu, 31 May 2018 18:42:48 +0200 X-Google-Sender-Auth: WEUYbslTsyQmK5aFeGSumhqvtyo Message-ID: Subject: Re: Can printk() sleep at runtime? To: Stephen Boyd Cc: Linus Torvalds , Petr Mladek , baijiaju1990@gmail.com, Bjorn Helgaas , SergeySenozhatsky , Steven Rostedt , Al Viro , Greg Kroah-Hartman , Jonathan Corbet , Linux Kernel Mailing List , Thomas Gleixner , Geert Uytterhoeven , Michael Turquette 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 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. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds