From: Peter Hurley <peter@hurleysoftware.com>
To: Nicolas Ferre <nicolas.ferre@atmel.com>,
Richard Genoud <richard.genoud@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Yegor Yefremov <yegor_sub1@visionsystems.de>,
Linus Walleij <linus.walleij@linaro.org>,
Alexander Shiyan <shc_work@mail.ru>,
linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] tty/serial: at91: BUG: disable interrupts when !UART_ENABLE_MS()
Date: Fri, 05 Sep 2014 07:06:14 -0400 [thread overview]
Message-ID: <54099926.6000302@hurleysoftware.com> (raw)
In-Reply-To: <54097F2E.6090809@atmel.com>
Hi Nicolas,
On 09/05/2014 05:15 AM, Nicolas Ferre wrote:
> On 03/09/2014 18:09, Richard Genoud :
> Richard,
>
> Indeed it seems needed:
>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>
>
> But BTW, I see just below a call to the atmel_enable_ms() function in
> atmel_set_ldisc(). My question is, shouldn't we also add this
> atmel_disable_ms() in the alternative that disables the PPS in this
> ldisc function?
I have that change in another series but it has to wait for:
1. another series that fixes races setting and clearing the controlling tty
(and reduces the footprint of tty_mutex)
2. a series built on that which moves tty_lock() out from under tty_mutex
when reopening ttys
This allows the tty_lock to be held while closing the tty.
3. a series which removes the ldisc flush from the serial core, among some
other locking fixes in the serial core.
This fixes a lock inversion between the termios_rwsem and the port mutex.
All of which enables the set_ldisc() notification to be safely passed
termios so it can use UART_ENABLE_MS() and also claim the port mutex
to change the UPF_HARDPPS_CD flag, which is currently non-atomic and
may corrupt the uart port flags field.
The series also claims the port lock around the *_enable_ms() in the
various set_ldisc() handlers to protect the hardware re-programming :)
Right now, all of this is temporarily stuck on the most recent patch
series, which hinges on whether the kernel should continue to support
non-atomic byte stores.
Regards,
Peter Hurley
WARNING: multiple messages have this Message-ID (diff)
From: peter@hurleysoftware.com (Peter Hurley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] tty/serial: at91: BUG: disable interrupts when !UART_ENABLE_MS()
Date: Fri, 05 Sep 2014 07:06:14 -0400 [thread overview]
Message-ID: <54099926.6000302@hurleysoftware.com> (raw)
In-Reply-To: <54097F2E.6090809@atmel.com>
Hi Nicolas,
On 09/05/2014 05:15 AM, Nicolas Ferre wrote:
> On 03/09/2014 18:09, Richard Genoud :
> Richard,
>
> Indeed it seems needed:
>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>
>
> But BTW, I see just below a call to the atmel_enable_ms() function in
> atmel_set_ldisc(). My question is, shouldn't we also add this
> atmel_disable_ms() in the alternative that disables the PPS in this
> ldisc function?
I have that change in another series but it has to wait for:
1. another series that fixes races setting and clearing the controlling tty
(and reduces the footprint of tty_mutex)
2. a series built on that which moves tty_lock() out from under tty_mutex
when reopening ttys
This allows the tty_lock to be held while closing the tty.
3. a series which removes the ldisc flush from the serial core, among some
other locking fixes in the serial core.
This fixes a lock inversion between the termios_rwsem and the port mutex.
All of which enables the set_ldisc() notification to be safely passed
termios so it can use UART_ENABLE_MS() and also claim the port mutex
to change the UPF_HARDPPS_CD flag, which is currently non-atomic and
may corrupt the uart port flags field.
The series also claims the port lock around the *_enable_ms() in the
various set_ldisc() handlers to protect the hardware re-programming :)
Right now, all of this is temporarily stuck on the most recent patch
series, which hinges on whether the kernel should continue to support
non-atomic byte stores.
Regards,
Peter Hurley
next prev parent reply other threads:[~2014-09-05 11:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 16:09 [PATCH] tty/serial: at91: BUG: disable interrupts when !UART_ENABLE_MS() Richard Genoud
2014-09-03 16:09 ` Richard Genoud
2014-09-04 15:47 ` Peter Hurley
2014-09-04 15:47 ` Peter Hurley
2014-09-05 9:15 ` Nicolas Ferre
2014-09-05 9:15 ` Nicolas Ferre
2014-09-05 11:06 ` Peter Hurley [this message]
2014-09-05 11:06 ` Peter Hurley
2014-09-05 12:48 ` Nicolas Ferre
2014-09-05 12:48 ` Nicolas Ferre
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=54099926.6000302@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=richard.genoud@gmail.com \
--cc=shc_work@mail.ru \
--cc=yegor_sub1@visionsystems.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.