linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr
@ 2018-06-01  9:28 Geert Uytterhoeven
  2018-06-01  9:28 ` [PATCH 1/4] clk: renesas: cpg-mssr: Stop using " Geert Uytterhoeven
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2018-06-01  9:28 UTC (permalink / raw)
  To: Jia-Ju Bai, Jonathan Corbet, Michael Turquette, Stephen Boyd,
	Zhang Rui, Eduardo Valentin, Eric Anholt, Stefan Wahren,
	Greg Kroah-Hartman
  Cc: Sergey Senozhatsky, Petr Mladek, Linus Torvalds, Steven Rostedt,
	linux-doc, linux-clk, linux-pm, linux-serial, linux-arm-kernel,
	linux-renesas-soc, linux-kernel, Geert Uytterhoeven

	Hi all,

"%pCr" formats the current rate of a clock, and calls clk_get_rate().
The latter obtains a mutex, hence it must not be called from atomic
context.  As vsprintf() (and e.g. printk()) must be callable from any
context, it's better to remove support for this (rarely-used) format.

This patch series:
  - Changes all existing users of "%pCr" to print the result of
    clk_get_rate() directly, which is safe as they all do this in task
    context only,
  - Removes support for the "%pCr" printk format.

Note that any remaining out-of-tree users will start seeing the clock's
name printed instead of its rate.

Thanks for your comments!

Geert Uytterhoeven (4):
  clk: renesas: cpg-mssr: Stop using printk format %pCr
  thermal: bcm2835: Stop using printk format %pCr
  serial: sh-sci: Stop using printk format %pCr
  lib/vsprintf: Remove atomic-unsafe support for %pCr

 Documentation/core-api/printk-formats.rst  | 3 +--
 drivers/clk/renesas/renesas-cpg-mssr.c     | 9 +++++----
 drivers/thermal/broadcom/bcm2835_thermal.c | 4 ++--
 drivers/tty/serial/sh-sci.c                | 4 ++--
 lib/vsprintf.c                             | 3 ---
 5 files changed, 10 insertions(+), 13 deletions(-)

-- 
2.7.4

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/4] clk: renesas: cpg-mssr: Stop using printk format %pCr
  2018-06-01  9:28 [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Geert Uytterhoeven
@ 2018-06-01  9:28 ` Geert Uytterhoeven
  2018-06-01 16:37   ` Stephen Boyd
  2018-06-01  9:28 ` [PATCH 2/4] thermal: bcm2835: " Geert Uytterhoeven
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2018-06-01  9:28 UTC (permalink / raw)
  To: Jia-Ju Bai, Jonathan Corbet, Michael Turquette, Stephen Boyd,
	Zhang Rui, Eduardo Valentin, Eric Anholt, Stefan Wahren,
	Greg Kroah-Hartman
  Cc: Sergey Senozhatsky, Petr Mladek, Linus Torvalds, Steven Rostedt,
	linux-doc, linux-clk, linux-pm, linux-serial, linux-arm-kernel,
	linux-renesas-soc, linux-kernel, Geert Uytterhoeven

Printk format "%pCr" will be removed soon, as clk_get_rate() must not be
called in atomic context.

Replace it by open-coding the operation.  This is safe here, as the code
runs in task context.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/clk/renesas/renesas-cpg-mssr.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index 49e510691eeeab07..f4b013e9352d9efc 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -258,8 +258,9 @@ struct clk *cpg_mssr_clk_src_twocell_get(struct of_phandle_args *clkspec,
 		dev_err(dev, "Cannot get %s clock %u: %ld", type, clkidx,
 		       PTR_ERR(clk));
 	else
-		dev_dbg(dev, "clock (%u, %u) is %pC at %pCr Hz\n",
-			clkspec->args[0], clkspec->args[1], clk, clk);
+		dev_dbg(dev, "clock (%u, %u) is %pC at %lu Hz\n",
+			clkspec->args[0], clkspec->args[1], clk,
+			clk_get_rate(clk));
 	return clk;
 }
 
@@ -326,7 +327,7 @@ static void __init cpg_mssr_register_core_clk(const struct cpg_core_clk *core,
 	if (IS_ERR_OR_NULL(clk))
 		goto fail;
 
-	dev_dbg(dev, "Core clock %pC at %pCr Hz\n", clk, clk);
+	dev_dbg(dev, "Core clock %pC at %lu Hz\n", clk, clk_get_rate(clk));
 	priv->clks[id] = clk;
 	return;
 
@@ -392,7 +393,7 @@ static void __init cpg_mssr_register_mod_clk(const struct mssr_mod_clk *mod,
 	if (IS_ERR(clk))
 		goto fail;
 
-	dev_dbg(dev, "Module clock %pC at %pCr Hz\n", clk, clk);
+	dev_dbg(dev, "Module clock %pC at %lu Hz\n", clk, clk_get_rate(clk));
 	priv->clks[id] = clk;
 	priv->smstpcr_saved[clock->index / 32].mask |= BIT(clock->index % 32);
 	return;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 2/4] thermal: bcm2835: Stop using printk format %pCr
  2018-06-01  9:28 [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Geert Uytterhoeven
  2018-06-01  9:28 ` [PATCH 1/4] clk: renesas: cpg-mssr: Stop using " Geert Uytterhoeven
@ 2018-06-01  9:28 ` Geert Uytterhoeven
  2018-06-01  9:35   ` Stefan Wahren
  2018-06-01  9:28 ` [PATCH 3/4] serial: sh-sci: " Geert Uytterhoeven
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2018-06-01  9:28 UTC (permalink / raw)
  To: Jia-Ju Bai, Jonathan Corbet, Michael Turquette, Stephen Boyd,
	Zhang Rui, Eduardo Valentin, Eric Anholt, Stefan Wahren,
	Greg Kroah-Hartman
  Cc: Sergey Senozhatsky, Petr Mladek, Linus Torvalds, Steven Rostedt,
	linux-doc, linux-clk, linux-pm, linux-serial, linux-arm-kernel,
	linux-renesas-soc, linux-kernel, Geert Uytterhoeven

Printk format "%pCr" will be removed soon, as clk_get_rate() must not be
called in atomic context.

Replace it by printing the variable that already holds the clock rate.
Note that calling clk_get_rate() is safe here, as the code runs in task
context.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/thermal/broadcom/bcm2835_thermal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c
index a4d6a0e2e9938190..23ad4f9f21438e45 100644
--- a/drivers/thermal/broadcom/bcm2835_thermal.c
+++ b/drivers/thermal/broadcom/bcm2835_thermal.c
@@ -213,8 +213,8 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
 	rate = clk_get_rate(data->clk);
 	if ((rate < 1920000) || (rate > 5000000))
 		dev_warn(&pdev->dev,
-			 "Clock %pCn running at %pCr Hz is outside of the recommended range: 1.92 to 5MHz\n",
-			 data->clk, data->clk);
+			 "Clock %pCn running at %lu Hz is outside of the recommended range: 1.92 to 5MHz\n",
+			 data->clk, rate);
 
 	/* register of thermal sensor and get info from DT */
 	tz = thermal_zone_of_sensor_register(&pdev->dev, 0, data,
-- 
2.7.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 3/4] serial: sh-sci: Stop using printk format %pCr
  2018-06-01  9:28 [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Geert Uytterhoeven
  2018-06-01  9:28 ` [PATCH 1/4] clk: renesas: cpg-mssr: Stop using " Geert Uytterhoeven
  2018-06-01  9:28 ` [PATCH 2/4] thermal: bcm2835: " Geert Uytterhoeven
@ 2018-06-01  9:28 ` Geert Uytterhoeven
  2018-06-01  9:28 ` [PATCH 4/4] lib/vsprintf: Remove atomic-unsafe support for %pCr Geert Uytterhoeven
  2018-06-01 11:00 ` [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Linus Torvalds
  4 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2018-06-01  9:28 UTC (permalink / raw)
  To: Jia-Ju Bai, Jonathan Corbet, Michael Turquette, Stephen Boyd,
	Zhang Rui, Eduardo Valentin, Eric Anholt, Stefan Wahren,
	Greg Kroah-Hartman
  Cc: Sergey Senozhatsky, Petr Mladek, Linus Torvalds, Steven Rostedt,
	linux-doc, linux-clk, linux-pm, linux-serial, linux-arm-kernel,
	linux-renesas-soc, linux-kernel, Geert Uytterhoeven

Printk format "%pCr" will be removed soon, as clk_get_rate() must not be
called in atomic context.

Replace it by open-coding the operation.  This is safe here, as the code
runs in task context.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/tty/serial/sh-sci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index b46b146524ce7495..c181eb37f98509e6 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2724,8 +2724,8 @@ static int sci_init_clocks(struct sci_port *sci_port, struct device *dev)
 			dev_dbg(dev, "failed to get %s (%ld)\n", clk_names[i],
 				PTR_ERR(clk));
 		else
-			dev_dbg(dev, "clk %s is %pC rate %pCr\n", clk_names[i],
-				clk, clk);
+			dev_dbg(dev, "clk %s is %pC rate %lu\n", clk_names[i],
+				clk, clk_get_rate(clk));
 		sci_port->clks[i] = IS_ERR(clk) ? NULL : clk;
 	}
 	return 0;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 4/4] lib/vsprintf: Remove atomic-unsafe support for %pCr
  2018-06-01  9:28 [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2018-06-01  9:28 ` [PATCH 3/4] serial: sh-sci: " Geert Uytterhoeven
@ 2018-06-01  9:28 ` Geert Uytterhoeven
  2018-06-01 11:00 ` [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Linus Torvalds
  4 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2018-06-01  9:28 UTC (permalink / raw)
  To: Jia-Ju Bai, Jonathan Corbet, Michael Turquette, Stephen Boyd,
	Zhang Rui, Eduardo Valentin, Eric Anholt, Stefan Wahren,
	Greg Kroah-Hartman
  Cc: Sergey Senozhatsky, Petr Mladek, Linus Torvalds, Steven Rostedt,
	linux-doc, linux-clk, linux-pm, linux-serial, linux-arm-kernel,
	linux-renesas-soc, linux-kernel, Geert Uytterhoeven

"%pCr" formats the current rate of a clock, and calls clk_get_rate().
The latter obtains a mutex, hence it must not be called from atomic
context.

Remove support for this rarely-used format, as vsprintf() (and e.g.
printk()) must be callable from any context.

Any remaining out-of-tree users will start seeing the clock's name
printed instead of its rate.

Reported-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Fixes: 900cca2944254edd ("lib/vsprintf: add %pC{,n,r} format specifiers for clocks")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 Documentation/core-api/printk-formats.rst | 3 +--
 lib/vsprintf.c                            | 3 ---
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/Documentation/core-api/printk-formats.rst b/Documentation/core-api/printk-formats.rst
index eb30efdd2e789616..25dc591cb1108790 100644
--- a/Documentation/core-api/printk-formats.rst
+++ b/Documentation/core-api/printk-formats.rst
@@ -419,11 +419,10 @@ struct clk
 
 	%pC	pll1
 	%pCn	pll1
-	%pCr	1560000000
 
 For printing struct clk structures. %pC and %pCn print the name
 (Common Clock Framework) or address (legacy clock framework) of the
-structure; %pCr prints the current clock rate.
+structure.
 
 Passed by reference.
 
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 247a7e0bf24f6f74..a48aaa79d352313a 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1469,9 +1469,6 @@ char *clock(char *buf, char *end, struct clk *clk, struct printf_spec spec,
 		return string(buf, end, NULL, spec);
 
 	switch (fmt[1]) {
-	case 'r':
-		return number(buf, end, clk_get_rate(clk), spec);
-
 	case 'n':
 	default:
 #ifdef CONFIG_COMMON_CLK
-- 
2.7.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/4] thermal: bcm2835: Stop using printk format %pCr
  2018-06-01  9:28 ` [PATCH 2/4] thermal: bcm2835: " Geert Uytterhoeven
@ 2018-06-01  9:35   ` Stefan Wahren
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Wahren @ 2018-06-01  9:35 UTC (permalink / raw)
  To: Geert Uytterhoeven, Jia-Ju Bai, Jonathan Corbet,
	Michael Turquette, Stephen Boyd, Zhang Rui, Eduardo Valentin,
	Eric Anholt, Greg Kroah-Hartman
  Cc: Sergey Senozhatsky, Petr Mladek, Linus Torvalds, Steven Rostedt,
	linux-doc, linux-clk, linux-pm, linux-serial, linux-arm-kernel,
	linux-renesas-soc, linux-kernel



Am 01.06.2018 um 11:28 schrieb Geert Uytterhoeven:
> Printk format "%pCr" will be removed soon, as clk_get_rate() must not be
> called in atomic context.
>
> Replace it by printing the variable that already holds the clock rate.
> Note that calling clk_get_rate() is safe here, as the code runs in task
> context.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>

Thanks

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr
  2018-06-01  9:28 [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Geert Uytterhoeven
                   ` (3 preceding siblings ...)
  2018-06-01  9:28 ` [PATCH 4/4] lib/vsprintf: Remove atomic-unsafe support for %pCr Geert Uytterhoeven
@ 2018-06-01 11:00 ` Linus Torvalds
  2018-06-01 11:04   ` Andy Shevchenko
  2018-06-01 11:47   ` Petr Mladek
  4 siblings, 2 replies; 12+ messages in thread
From: Linus Torvalds @ 2018-06-01 11:00 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: baijiaju1990, Jonathan Corbet, Michael Turquette, sboyd,
	Zhang Rui, Eduardo Valentin, Eric Anholt, Stefan Wahren,
	Greg Kroah-Hartman, Sergey Senozhatsky, Petr Mladek,
	Steven Rostedt, open list:DOCUMENTATION, linux-clk, Linux PM,
	linux-serial, linux-arm-kernel, Linux-Renesas,
	Linux Kernel Mailing List

On Fri, Jun 1, 2018 at 4:29 AM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> This patch series:
>   - Changes all existing users of "%pCr" to print the result of
>     clk_get_rate() directly, which is safe as they all do this in task
>     context only,
>   - Removes support for the "%pCr" printk format.

Looks good to me.

What tree will this go through? The normal printk one? Just checking
that this doesn't end up falling through the cracks because nobody
knows who would take it...

               Linus

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr
  2018-06-01 11:00 ` [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Linus Torvalds
@ 2018-06-01 11:04   ` Andy Shevchenko
  2018-06-01 11:47   ` Petr Mladek
  1 sibling, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2018-06-01 11:04 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Geert Uytterhoeven, Jia-Ju Bai, Jonathan Corbet,
	Michael Turquette, Stephen Boyd, Zhang Rui, Eduardo Valentin,
	Eric Anholt, Stefan Wahren, Greg Kroah-Hartman,
	Sergey Senozhatsky, Petr Mladek, Steven Rostedt,
	open list:DOCUMENTATION, linux-clk, Linux PM, linux-serial,
	linux-arm-kernel, Linux-Renesas, Linux Kernel Mailing List

On Fri, Jun 1, 2018 at 2:00 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Fri, Jun 1, 2018 at 4:29 AM Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
>>
>> This patch series:
>>   - Changes all existing users of "%pCr" to print the result of
>>     clk_get_rate() directly, which is safe as they all do this in task
>>     context only,
>>   - Removes support for the "%pCr" printk format.
>
> Looks good to me.
>
> What tree will this go through? The normal printk one? Just checking
> that this doesn't end up falling through the cracks because nobody
> knows who would take it...

We discussed few month before with Petr that he would take care of the
patches against vsprintf.c.
I think this is the case here.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr
  2018-06-01 11:00 ` [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Linus Torvalds
  2018-06-01 11:04   ` Andy Shevchenko
@ 2018-06-01 11:47   ` Petr Mladek
  2018-06-01 15:19     ` Petr Mladek
  1 sibling, 1 reply; 12+ messages in thread
From: Petr Mladek @ 2018-06-01 11:47 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Geert Uytterhoeven, baijiaju1990, Jonathan Corbet,
	Michael Turquette, sboyd, Zhang Rui, Eduardo Valentin,
	Eric Anholt, Stefan Wahren, Greg Kroah-Hartman,
	Sergey Senozhatsky, Steven Rostedt, open list:DOCUMENTATION,
	linux-clk, Linux PM, linux-serial, linux-arm-kernel,
	Linux-Renesas, Linux Kernel Mailing List

On Fri 2018-06-01 06:00:47, Linus Torvalds wrote:
> On Fri, Jun 1, 2018 at 4:29 AM Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> >
> > This patch series:
> >   - Changes all existing users of "%pCr" to print the result of
> >     clk_get_rate() directly, which is safe as they all do this in task
> >     context only,
> >   - Removes support for the "%pCr" printk format.
> 
> Looks good to me.
> 
> What tree will this go through? The normal printk one? Just checking
> that this doesn't end up falling through the cracks because nobody
> knows who would take it...

I will take it via printk.git. There already is bunch of vsprintf
changes for-4.18.

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr
  2018-06-01 11:47   ` Petr Mladek
@ 2018-06-01 15:19     ` Petr Mladek
  2018-06-01 15:28       ` Geert Uytterhoeven
  0 siblings, 1 reply; 12+ messages in thread
From: Petr Mladek @ 2018-06-01 15:19 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Geert Uytterhoeven, baijiaju1990, Jonathan Corbet,
	Michael Turquette, sboyd, Zhang Rui, Eduardo Valentin,
	Eric Anholt, Stefan Wahren, Greg Kroah-Hartman,
	Sergey Senozhatsky, Steven Rostedt, open list:DOCUMENTATION,
	linux-clk, Linux PM, linux-serial, linux-arm-kernel,
	Linux-Renesas, Linux Kernel Mailing List, stable

On Fri 2018-06-01 13:47:38, Petr Mladek wrote:
> On Fri 2018-06-01 06:00:47, Linus Torvalds wrote:
> > On Fri, Jun 1, 2018 at 4:29 AM Geert Uytterhoeven
> > <geert+renesas@glider.be> wrote:
> > >
> > > This patch series:
> > >   - Changes all existing users of "%pCr" to print the result of
> > >     clk_get_rate() directly, which is safe as they all do this in task
> > >     context only,
> > >   - Removes support for the "%pCr" printk format.
> > 
> > Looks good to me.
> > 
> > What tree will this go through? The normal printk one? Just checking
> > that this doesn't end up falling through the cracks because nobody
> > knows who would take it...
> 
> I will take it via printk.git. There already is bunch of vsprintf
> changes for-4.18.

It is in printk.git, branch for-4.18-vsprintf-pcr-removal now.

Also I have added Cc: stable@vger.kernel.org into the commit messages.

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr
  2018-06-01 15:19     ` Petr Mladek
@ 2018-06-01 15:28       ` Geert Uytterhoeven
  0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2018-06-01 15:28 UTC (permalink / raw)
  To: Petr Mladek
  Cc: Linus Torvalds, Geert Uytterhoeven, Jia-Ju Bai, Jonathan Corbet,
	Michael Turquette, Stephen Boyd, Zhang Rui, Eduardo Valentin,
	Eric Anholt, Stefan Wahren, Greg Kroah-Hartman,
	Sergey Senozhatsky, Steven Rostedt, open list:DOCUMENTATION,
	linux-clk, Linux PM, linux-serial, linux-arm-kernel,
	Linux-Renesas, Linux Kernel Mailing List, stable

Hi Petr,

On Fri, Jun 1, 2018 at 5:19 PM, Petr Mladek <pmladek@suse.com> wrote:
> On Fri 2018-06-01 13:47:38, Petr Mladek wrote:
>> On Fri 2018-06-01 06:00:47, Linus Torvalds wrote:
>> > On Fri, Jun 1, 2018 at 4:29 AM Geert Uytterhoeven
>> > <geert+renesas@glider.be> wrote:
>> > >
>> > > This patch series:
>> > >   - Changes all existing users of "%pCr" to print the result of
>> > >     clk_get_rate() directly, which is safe as they all do this in task
>> > >     context only,
>> > >   - Removes support for the "%pCr" printk format.
>> >
>> > Looks good to me.
>> >
>> > What tree will this go through? The normal printk one? Just checking
>> > that this doesn't end up falling through the cracks because nobody
>> > knows who would take it...
>>
>> I will take it via printk.git. There already is bunch of vsprintf
>> changes for-4.18.
>
> It is in printk.git, branch for-4.18-vsprintf-pcr-removal now.

Thank you.

> Also I have added Cc: stable@vger.kernel.org into the commit messages.

I can confirm all stable version references ("v4.x+") match.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/4] clk: renesas: cpg-mssr: Stop using printk format %pCr
  2018-06-01  9:28 ` [PATCH 1/4] clk: renesas: cpg-mssr: Stop using " Geert Uytterhoeven
@ 2018-06-01 16:37   ` Stephen Boyd
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Boyd @ 2018-06-01 16:37 UTC (permalink / raw)
  To: Eduardo Valentin, Eric Anholt, Geert Uytterhoeven,
	Greg Kroah-Hartman, Jia-Ju Bai, Jonathan Corbet,
	Michael Turquette, Stefan Wahren, Zhang Rui
  Cc: Petr Mladek, Sergey Senozhatsky, Geert Uytterhoeven, linux-doc,
	linux-pm, linux-kernel, Steven Rostedt, linux-renesas-soc,
	linux-serial, Linus Torvalds, linux-clk, linux-arm-kernel

Quoting Geert Uytterhoeven (2018-06-01 02:28:19)
> Printk format "%pCr" will be removed soon, as clk_get_rate() must not be
> called in atomic context.
> =

> Replace it by open-coding the operation.  This is safe here, as the code
> runs in task context.
> =

> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-06-01 16:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-01  9:28 [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Geert Uytterhoeven
2018-06-01  9:28 ` [PATCH 1/4] clk: renesas: cpg-mssr: Stop using " Geert Uytterhoeven
2018-06-01 16:37   ` Stephen Boyd
2018-06-01  9:28 ` [PATCH 2/4] thermal: bcm2835: " Geert Uytterhoeven
2018-06-01  9:35   ` Stefan Wahren
2018-06-01  9:28 ` [PATCH 3/4] serial: sh-sci: " Geert Uytterhoeven
2018-06-01  9:28 ` [PATCH 4/4] lib/vsprintf: Remove atomic-unsafe support for %pCr Geert Uytterhoeven
2018-06-01 11:00 ` [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Linus Torvalds
2018-06-01 11:04   ` Andy Shevchenko
2018-06-01 11:47   ` Petr Mladek
2018-06-01 15:19     ` Petr Mladek
2018-06-01 15:28       ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox