linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] serial: sh-sci: disable DMA for uart_console
@ 2019-05-13 15:47 George G. Davis
  2019-05-14  8:28 ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: George G. Davis @ 2019-05-13 15:47 UTC (permalink / raw)
  To: Eugeniu Rosca, Geert Uytterhoeven, Simon Horman, Wolfram Sang,
	Greg Kroah-Hartman, Jiri Slaby, open list:SERIAL DRIVERS,
	open list
  Cc: Chris Brandt, Ulrich Hecht, Andy Lowe, Linux-Renesas,
	OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Magnus Damm,
	Rob Herring, Mark Rutland, George G. Davis, stable

As noted in commit 84b40e3b57ee ("serial: 8250: omap: Disable DMA for
console UART"), UART console lines use low-level PIO only access functions
which will conflict with use of the line when DMA is enabled, e.g. when
the console line is also used for systemd messages. So disable DMA
support for UART console lines.

Fixes: https://patchwork.kernel.org/patch/10929511/
Reported-by: Michael Rodin <mrodin@de.adit-jv.com>
Tested-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: stable@vger.kernel.org
Signed-off-by: George G. Davis <george_davis@mentor.com>
---
v2: Clarify comment regarding DMA support on kernel console,
    add {Tested,Reviewed}-by:, and Cc: linux-stable lines.
---
 drivers/tty/serial/sh-sci.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 3cd139752d3f..abc705716aa0 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1557,6 +1557,13 @@ static void sci_request_dma(struct uart_port *port)
 
 	dev_dbg(port->dev, "%s: port %d\n", __func__, port->line);
 
+	/*
+	 * DMA on console may interfere with Kernel log messages which use
+	 * plain putchar(). So, simply don't use it with a console.
+	 */
+	if (uart_console(port))
+		return;
+
 	if (!port->dev->of_node)
 		return;
 
-- 
2.7.4


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

* Re: [PATCH v2] serial: sh-sci: disable DMA for uart_console
  2019-05-13 15:47 [PATCH v2] serial: sh-sci: disable DMA for uart_console George G. Davis
@ 2019-05-14  8:28 ` Geert Uytterhoeven
  2019-05-14 15:30   ` George G. Davis
  0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2019-05-14  8:28 UTC (permalink / raw)
  To: George G. Davis
  Cc: Eugeniu Rosca, Simon Horman, Wolfram Sang, Greg Kroah-Hartman,
	Jiri Slaby, open list:SERIAL DRIVERS, open list, Chris Brandt,
	Ulrich Hecht, Andy Lowe, Linux-Renesas,
	OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Magnus Damm,
	Rob Herring, Mark Rutland, stable

Hi George,

On Mon, May 13, 2019 at 5:48 PM George G. Davis <george_davis@mentor.com> wrote:
> As noted in commit 84b40e3b57ee ("serial: 8250: omap: Disable DMA for
> console UART"), UART console lines use low-level PIO only access functions
> which will conflict with use of the line when DMA is enabled, e.g. when
> the console line is also used for systemd messages. So disable DMA
> support for UART console lines.
>
> Fixes: https://patchwork.kernel.org/patch/10929511/

I don't think this is an appropriate reference, as it points to a patch that
was never applied.

As the problem has basically existed forever, IMHO no Fixes tag
is needed.

> Reported-by: Michael Rodin <mrodin@de.adit-jv.com>
> Tested-by: Eugeniu Rosca <erosca@de.adit-jv.com>
> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: George G. Davis <george_davis@mentor.com>
> ---
> v2: Clarify comment regarding DMA support on kernel console,
>     add {Tested,Reviewed}-by:, and Cc: linux-stable lines.

Thanks for the update!

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

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] 5+ messages in thread

* Re: [PATCH v2] serial: sh-sci: disable DMA for uart_console
  2019-05-14  8:28 ` Geert Uytterhoeven
@ 2019-05-14 15:30   ` George G. Davis
  2019-05-14 15:54     ` Wolfram Sang
  0 siblings, 1 reply; 5+ messages in thread
From: George G. Davis @ 2019-05-14 15:30 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Eugeniu Rosca, Simon Horman, Wolfram Sang, Greg Kroah-Hartman,
	Jiri Slaby, open list:SERIAL DRIVERS, open list, Chris Brandt,
	Ulrich Hecht, Andy Lowe, Linux-Renesas,
	OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Magnus Damm,
	Rob Herring, Mark Rutland, stable

Hello Geert,

On Tue, May 14, 2019 at 10:28:34AM +0200, Geert Uytterhoeven wrote:
> Hi George,
> 
> On Mon, May 13, 2019 at 5:48 PM George G. Davis <george_davis@mentor.com> wrote:
> > As noted in commit 84b40e3b57ee ("serial: 8250: omap: Disable DMA for
> > console UART"), UART console lines use low-level PIO only access functions
> > which will conflict with use of the line when DMA is enabled, e.g. when
> > the console line is also used for systemd messages. So disable DMA
> > support for UART console lines.
> >
> > Fixes: https://patchwork.kernel.org/patch/10929511/
> 
> I don't think this is an appropriate reference, as it points to a patch that
> was never applied.

I included it as a link to an upstream problem report similar to other commits
that I previewed. The link provides the extra context that I was perhaps to
lazy to note in the commit header.

> As the problem has basically existed forever,

Agreed

> IMHO no Fixes tag
> is needed.

I've dropped the Fixes line.

> > Reported-by: Michael Rodin <mrodin@de.adit-jv.com>
> > Tested-by: Eugeniu Rosca <erosca@de.adit-jv.com>
> > Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
> > Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > Cc: stable@vger.kernel.org
> > Signed-off-by: George G. Davis <george_davis@mentor.com>
> > ---
> > v2: Clarify comment regarding DMA support on kernel console,
> >     add {Tested,Reviewed}-by:, and Cc: linux-stable lines.
> 
> Thanks for the update!

Thanks!


I'll submit v3 later today.

> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> 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

-- 
Regards,
George

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

* Re: [PATCH v2] serial: sh-sci: disable DMA for uart_console
  2019-05-14 15:30   ` George G. Davis
@ 2019-05-14 15:54     ` Wolfram Sang
  2019-05-14 16:16       ` George G. Davis
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2019-05-14 15:54 UTC (permalink / raw)
  To: George G. Davis
  Cc: Geert Uytterhoeven, Eugeniu Rosca, Simon Horman, Wolfram Sang,
	Greg Kroah-Hartman, Jiri Slaby, open list:SERIAL DRIVERS,
	open list, Chris Brandt, Ulrich Hecht, Andy Lowe, Linux-Renesas,
	OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Magnus Damm,
	Rob Herring, Mark Rutland, stable

[-- Attachment #1: Type: text/plain, Size: 485 bytes --]


> > > Fixes: https://patchwork.kernel.org/patch/10929511/
> > 
> > I don't think this is an appropriate reference, as it points to a patch that
> > was never applied.
> 
> I included it as a link to an upstream problem report similar to other commits
> that I previewed. The link provides the extra context that I was perhaps to
> lazy to note in the commit header.

We have a "Link:" tag for things like this, e.g.:

Link: https://patchwork.kernel.org/patch/10929511/


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v2] serial: sh-sci: disable DMA for uart_console
  2019-05-14 15:54     ` Wolfram Sang
@ 2019-05-14 16:16       ` George G. Davis
  0 siblings, 0 replies; 5+ messages in thread
From: George G. Davis @ 2019-05-14 16:16 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Geert Uytterhoeven, Eugeniu Rosca, Simon Horman, Wolfram Sang,
	Greg Kroah-Hartman, Jiri Slaby, open list:SERIAL DRIVERS,
	open list, Chris Brandt, Ulrich Hecht, Andy Lowe, Linux-Renesas,
	OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Magnus Damm,
	Rob Herring, Mark Rutland, stable

Hello Wolfram,

On Tue, May 14, 2019 at 05:54:51PM +0200, Wolfram Sang wrote:
> 
> > > > Fixes: https://patchwork.kernel.org/patch/10929511/
> > > 
> > > I don't think this is an appropriate reference, as it points to a patch that
> > > was never applied.
> > 
> > I included it as a link to an upstream problem report similar to other commits
> > that I previewed. The link provides the extra context that I was perhaps to
> > lazy to note in the commit header.
> 
> We have a "Link:" tag for things like this, e.g.:
> 
> Link: https://patchwork.kernel.org/patch/10929511/

Right, I've changed it to a Link instead.

Thanks!

-- 
Regards,
George

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

end of thread, other threads:[~2019-05-14 16:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-13 15:47 [PATCH v2] serial: sh-sci: disable DMA for uart_console George G. Davis
2019-05-14  8:28 ` Geert Uytterhoeven
2019-05-14 15:30   ` George G. Davis
2019-05-14 15:54     ` Wolfram Sang
2019-05-14 16:16       ` George G. Davis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).