提交 cdc45f20 编写于 作者: A Anton Ivanov 提交者: Greg Kroah-Hartman

um: Make line/tty semantics use true write IRQ

[ Upstream commit 917e2fd2c53eb3c4162f5397555cbd394390d4bc ]

This fixes a long standing bug where large amounts of output
could freeze the tty (most commonly seen on stdio console).
While the bug has always been there it became more pronounced
after moving to the new interrupt controller.

The line semantics are now changed to have true IRQ write
semantics which should further improve the tty/line subsystem
stability and performance
Signed-off-by: NAnton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 a17e3bbf
...@@ -261,7 +261,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data) ...@@ -261,7 +261,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data)
if (err == 0) { if (err == 0) {
spin_unlock(&line->lock); spin_unlock(&line->lock);
return IRQ_NONE; return IRQ_NONE;
} else if (err < 0) { } else if ((err < 0) && (err != -EAGAIN)) {
line->head = line->buffer; line->head = line->buffer;
line->tail = line->buffer; line->tail = line->buffer;
} }
...@@ -284,7 +284,7 @@ int line_setup_irq(int fd, int input, int output, struct line *line, void *data) ...@@ -284,7 +284,7 @@ int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
if (err) if (err)
return err; return err;
if (output) if (output)
err = um_request_irq(driver->write_irq, fd, IRQ_NONE, err = um_request_irq(driver->write_irq, fd, IRQ_WRITE,
line_write_interrupt, IRQF_SHARED, line_write_interrupt, IRQF_SHARED,
driver->write_irq_name, data); driver->write_irq_name, data);
return err; return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册