From 6778948f9de86c3cfaf36725a7c87dcff9ba247f Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 11 Dec 2023 08:20:59 +0000 Subject: [PATCH] kernel_5.10 no rt --- kernel/drivers/tty/serial/8250/8250_core.c | 17 +++++------------ 1 files changed, 5 insertions(+), 12 deletions(-) diff --git a/kernel/drivers/tty/serial/8250/8250_core.c b/kernel/drivers/tty/serial/8250/8250_core.c index bd52f7e..00f6dc7 100644 --- a/kernel/drivers/tty/serial/8250/8250_core.c +++ b/kernel/drivers/tty/serial/8250/8250_core.c @@ -275,8 +275,10 @@ * Must disable interrupts or else we risk racing with the interrupt * based handler. */ - if (up->port.irq) - ier = serial8250_clear_IER(up); + if (up->port.irq) { + ier = serial_in(up, UART_IER); + serial_out(up, UART_IER, 0); + } iir = serial_in(up, UART_IIR); @@ -299,7 +301,7 @@ serial8250_tx_chars(up); if (up->port.irq) - serial8250_set_IER(up, ier); + serial_out(up, UART_IER, ier); spin_unlock_irqrestore(&up->port.lock, flags); @@ -582,14 +584,6 @@ #ifdef CONFIG_SERIAL_8250_CONSOLE -static void univ8250_console_write_atomic(struct console *co, const char *s, - unsigned int count) -{ - struct uart_8250_port *up = &serial8250_ports[co->index]; - - serial8250_console_write_atomic(up, s, count); -} - static void univ8250_console_write(struct console *co, const char *s, unsigned int count) { @@ -683,7 +677,6 @@ static struct console univ8250_console = { .name = "ttyS", - .write_atomic = univ8250_console_write_atomic, .write = univ8250_console_write, .device = uart_console_device, .setup = univ8250_console_setup, -- Gitblit v1.6.2