From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Fabio Estevam <festevam@gmail.com>
Cc: Peter Senna Tschudin <peter.senna@collabora.com>,
Alan Cox <gnomes@lxorguk.ukuu.org.uk>,
Rob Herring <robherring2@gmail.com>,
Andrey Smirnov <andrew.smirnov@gmail.com>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
Chris Healy <cphealy@gmail.com>, Jiri Slaby <jslaby@suse.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC, PATCH] imx: serial: Take tty->files_lock opportunistically
Date: Mon, 12 Jun 2017 14:04:54 +0200 [thread overview]
Message-ID: <20170612120454.GB15695@kroah.com> (raw)
In-Reply-To: <CAOMZO5DBAzCLgL2C=cN0i_zPZoE44JBxQzXELmFhhGDDALXemw@mail.gmail.com>
On Mon, Jun 12, 2017 at 08:55:44AM -0300, Fabio Estevam wrote:
> Hi Greg,
>
> On Mon, Jun 12, 2017 at 3:46 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
>
> >> linux-next is good, but mainline is not.
> >>
> >> Actually we need 4dec2f119e86f9c9 ("imx-serial: RX DMA startup
> >> latency") to be applied to 4.12-rc as well.
> >
> > Why? Can't it wait until 4.13-rc1?
>
> Because without 4dec2f119e86f9c9 the imx serial driver behaves badly
> in 4.12-rc.
>
> Just tested 4.12-rc5 and there is scary verbose warning:
>
> [ 11.714904] =====================================================
> [ 11.721006] WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected
> [ 11.727628] 4.12.0-rc5 #413 Not tainted
> [ 11.731470] -----------------------------------------------------
> [ 11.737572] rawtest/219 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
> [ 11.744018] (&(&tty->files_lock)->rlock){+.+...}, at: [<c04d83a0>]
> imx_startup+0x2c4/0x510
> [ 11.752403]
> [ 11.752403] and this task is already holding:
> [ 11.758241] (&port_lock_key){-.....}, at: [<c04d81e8>]
> imx_startup+0x10c/0x510
> [ 11.765571] which would create a new lock dependency:
> [ 11.770626] (&port_lock_key){-.....} -> (&(&tty->files_lock)->rlock){+.+...}
> [ 11.777791]
> [ 11.777791] but this new dependency connects a HARDIRQ-irq-safe lock:
> [ 11.785712] (&port_lock_key){-.....}
> [ 11.785726]
> ....
>
> Complete stack at: https://pastebin.com/a2gUTwZK
>
> This problem is caused by commit 18a4208826dd0 ("imx-serial: Reduce RX
> DMA startup latency when opening for reading").
>
> linux-next has a fix for it: 4dec2f119e86f9c9 ("imx-serial: RX DMA
> startup latency")
>
> Applying 4dec2f119e86f9c9 ("imx-serial: RX DMA startup latency") into
> 4.12-rc5 makes the issue go away.
Ok, if I end up with some more tty/serial fixes for 4.12-final, I'll
consider queueing this one up as well, thanks.
greg k-h
prev parent reply other threads:[~2017-06-12 12:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 12:37 [RFC, PATCH] imx: serial: Take tty->files_lock opportunistically Andrey Smirnov
2017-05-30 12:59 ` Rob Herring
2017-05-30 13:42 ` Alan Cox
2017-05-30 13:44 ` Peter Senna Tschudin
2017-06-03 9:30 ` Greg Kroah-Hartman
2017-06-12 0:33 ` Fabio Estevam
2017-06-12 6:46 ` Greg Kroah-Hartman
2017-06-12 11:55 ` Fabio Estevam
2017-06-12 12:04 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170612120454.GB15695@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andrew.smirnov@gmail.com \
--cc=cphealy@gmail.com \
--cc=festevam@gmail.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter.senna@collabora.com \
--cc=robherring2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).