Skip to content

Commit

Permalink
hvc_console: Do not set low_latency when using interrupts
Browse files Browse the repository at this point in the history
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 33f0f88
    [PATCH] TTY layer buffering revamp

added this new api.

v2.6.16-rc3 via 8977d92
    [PATCH] tty buffering stall fix

claims to fix a stall discovered with hvc_console

v2.6.16-rc5 via fb5c594
   [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 <[email protected]>
  • Loading branch information
Milton Miller authored and ozbenh committed Jan 13, 2009
1 parent c21f7a5 commit da9dc13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/char/hvc_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
} /* else count == 0 */

tty->driver_data = hp;
tty->low_latency = 1; /* Makes flushes to ldisc synchronous. */
if (!hp->irq_requested)
tty->low_latency = 1; /* Makes flushes to ldisc synchronous. */

hp->tty = tty;

Expand Down

0 comments on commit da9dc13

Please sign in to comment.