blob: a6ddc990aaaf3984fc46e695ba7db5842c25b471 [file] [log] [blame]
From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 3 Jul 2009 08:30:01 -0500
Subject: serial: 8250: Call flush_to_ldisc when the irq is threaded
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
drivers/tty/serial/8250/8250.c | 2 ++
drivers/tty/tty_buffer.c | 4 ++++
2 files changed, 6 insertions(+)
Index: linux-stable/drivers/tty/serial/8250/8250.c
===================================================================
--- linux-stable.orig/drivers/tty/serial/8250/8250.c
+++ linux-stable/drivers/tty/serial/8250/8250.c
@@ -1549,12 +1549,14 @@ static irqreturn_t serial8250_interrupt(
l = l->next;
+#ifndef CONFIG_PREEMPT_RT_FULL
if (l == i->head && pass_counter++ > PASS_LIMIT) {
/* If we hit this, we're dead. */
printk_ratelimited(KERN_ERR
"serial8250: too much work for irq%d\n", irq);
break;
}
+#endif
} while (l != end);
spin_unlock(&i->lock);
Index: linux-stable/drivers/tty/tty_buffer.c
===================================================================
--- linux-stable.orig/drivers/tty/tty_buffer.c
+++ linux-stable/drivers/tty/tty_buffer.c
@@ -538,10 +538,14 @@ void tty_flip_buffer_push(struct tty_str
tty->buf.tail->commit = tty->buf.tail->used;
spin_unlock_irqrestore(&tty->buf.lock, flags);
+#ifndef CONFIG_PREEMPT_RT_FULL
if (tty->low_latency)
flush_to_ldisc(&tty->buf.work);
else
schedule_work(&tty->buf.work);
+#else
+ flush_to_ldisc(&tty->buf.work);
+#endif
}
EXPORT_SYMBOL(tty_flip_buffer_push);