From: Thomas Gleixner <tglx@linutronix.de>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: [PATCH] mpx5200_uart: drop port lock across tty_flip_buffer() call
Date: Wed, 25 Jul 2007 21:47:18 +0200 [thread overview]
Message-ID: <1185392838.3227.13.camel@chaos> (raw)
In-Reply-To: <fa686aa40707251242i6be0e30pd3b4019686308b0@mail.gmail.com>
On Wed, 2007-07-25 at 13:42 -0600, Grant Likely wrote:
> On 7/25/07, Thomas Gleixner <tglx@linutronix.de> wrote:
> > The port lock needs to be dropped across the tty_flip_buffer call, as it
> > would lead to a deadlock with the spin_lock(&port->lock) in uart_start()
> >
> > Uncovered by lockdep / preempt-rt
> >
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
> Instead of dropping the lock and reclaiming it, would it be better for
> me to rework the driver to only grab the lock in the 'meat' of
> mpc52xx_uart_int_rx_chars() and mpc52xx_uart_int_tx_chars()? (As
> opposed to holding the lock for the entirety of mpc52xx_uart_int())
No, it's not worth the trouble. You need to protect the hardware access.
> What convention is used in other drivers?
The same.
tglx
next prev parent reply other threads:[~2007-07-25 19:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 19:10 [PATCH] mpx5200_uart: drop port lock across tty_flip_buffer() call Thomas Gleixner
2007-07-25 19:42 ` Grant Likely
2007-07-25 19:47 ` Thomas Gleixner [this message]
2007-07-25 19:54 ` Grant Likely
2007-07-26 9:25 ` Daniel Schnell
2007-07-26 9:41 ` Thomas Gleixner
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=1185392838.3227.13.camel@chaos \
--to=tglx@linutronix.de \
--cc=grant.likely@secretlab.ca \
--cc=linuxppc-embedded@ozlabs.org \
/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).