linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* tty_flip_buffer() from atomic context when low_latency==1
@ 2011-08-19 19:43 Grant Edwards
  2011-08-19 20:24 ` Alan Cox
  0 siblings, 1 reply; 8+ messages in thread
From: Grant Edwards @ 2011-08-19 19:43 UTC (permalink / raw)
  To: linux-serial

I've been looking at various drivers to try to figure out how to
receive a block of serial data in an atomic context.  All the examples
I can find buffer the receive data with calls to
tty_insert_flip_string() or tty_insert_flip_char(), then they call
tty_flip_buffer_push().

But, many drivers appear to call tty_flip_buffer_push() from an atomic
context. If that is done with tty->low_latency==1 it turns into a call
to flush_to_ldisc(), which then calls disc->ops->receive_buf(), which
must not be called from an atomic context.

Is the low_latency flag being forced to 0 somewhere behind the scenes
when tty_flip_buffer_push() is being called from an atomic context?

-- 
Grant Edwards               grant.b.edwards        Yow! I'm receiving a coded
                                  at               message from EUBIE BLAKE!!
                              gmail.com            


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

end of thread, other threads:[~2011-08-19 22:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-19 19:43 tty_flip_buffer() from atomic context when low_latency==1 Grant Edwards
2011-08-19 20:24 ` Alan Cox
2011-08-19 20:44   ` Grant Edwards
2011-08-19 21:06     ` Alan Cox
2011-08-19 21:24       ` Grant Edwards
2011-08-19 21:31         ` Alan Cox
2011-08-19 21:52           ` Grant Edwards
2011-08-19 22:53             ` Alan Cox

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).