aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMilton Miller <miltonm@bga.com>2009-01-07 21:14:24 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-01-12 22:48:01 -0500
commitda9dc13289fa58dced12f2baff51dfb87c339ba3 (patch)
treeb087d8bbc5ab1701e1fef94523872e666cf9d24e /drivers
parentc21f7a527f7757a0e246cea521a5dd3b8e1224d5 (diff)
hvc_console: Do not set low_latency when using interrupts
hvc_console is setting low_latency unconditionally, but some clients are interrupt driven and will call hvc_poll from irq context. This will cause tty_flip_buffer_push to be called from irq context, and it very clearly states it must not be called from IRQ when low_latency is specified. Looking back through history: v2.6.16-rc1 via 33f0f88f1c51ae5c2d593d26960c760ea154c2e2 [PATCH] TTY layer buffering revamp added this new api. v2.6.16-rc3 via 8977d929e49021d9a6e031310aab01fa72f849c2 [PATCH] tty buffering stall fix claims to fix a stall discovered with hvc_console v2.6.16-rc5 via fb5c594c2acc441f0d2d8f457484a0e0e9285db3 [PATCH] Fix race condition in hvc console. said set this flag to avoid a stall problem, and was merged through the powerpc arch tree. Without searching for email discussions, it would appear to be an overlapping "fix", but one that did not consider all users. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/hvc_console.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index f2685b747fb9..0e18fdb9dddb 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -318,7 +318,8 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
318 } /* else count == 0 */ 318 } /* else count == 0 */
319 319
320 tty->driver_data = hp; 320 tty->driver_data = hp;
321 tty->low_latency = 1; /* Makes flushes to ldisc synchronous. */ 321 if (!hp->irq_requested)
322 tty->low_latency = 1; /* Makes flushes to ldisc synchronous. */
322 323
323 hp->tty = tty; 324 hp->tty = tty;
324 325