summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0100-serial-8250-implement-write_atomic.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/0100-serial-8250-implement-write_atomic.patch')
-rw-r--r--debian/patches-rt/0100-serial-8250-implement-write_atomic.patch54
1 files changed, 27 insertions, 27 deletions
diff --git a/debian/patches-rt/0100-serial-8250-implement-write_atomic.patch b/debian/patches-rt/0100-serial-8250-implement-write_atomic.patch
index ad692ff78..883c87ee1 100644
--- a/debian/patches-rt/0100-serial-8250-implement-write_atomic.patch
+++ b/debian/patches-rt/0100-serial-8250-implement-write_atomic.patch
@@ -1,8 +1,8 @@
-From 713182575337acb0891fcfaef75c3a36408d1766 Mon Sep 17 00:00:00 2001
+From f535d09d2867742a783be392b633b75d923ef748 Mon Sep 17 00:00:00 2001
From: John Ogness <john.ogness@linutronix.de>
Date: Mon, 30 Nov 2020 01:42:02 +0106
Subject: [PATCH 100/323] serial: 8250: implement write_atomic
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.204-rt100.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.215-rt107.tar.xz
Implement a non-sleeping NMI-safe write_atomic() console function in
order to support emergency console printing.
@@ -27,7 +27,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
7 files changed, 162 insertions(+), 44 deletions(-)
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
-index 61b11490ae5b..32c534b87397 100644
+index 61b11490ae5be..32c534b87397f 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -152,12 +152,55 @@ static inline void serial_dl_write(struct uart_8250_port *up, int value)
@@ -97,7 +97,7 @@ index 61b11490ae5b..32c534b87397 100644
}
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
-index 43f2eed6df78..687119fe2f8c 100644
+index 355ee338d752c..5c1bb9e06b14e 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -275,10 +275,8 @@ static void serial8250_backup_timeout(struct timer_list *t)
@@ -146,7 +146,7 @@ index 43f2eed6df78..687119fe2f8c 100644
.device = uart_console_device,
.setup = univ8250_console_setup,
diff --git a/drivers/tty/serial/8250/8250_fsl.c b/drivers/tty/serial/8250/8250_fsl.c
-index fbcc90c31ca1..b33cb454ce03 100644
+index fbcc90c31ca11..b33cb454ce037 100644
--- a/drivers/tty/serial/8250/8250_fsl.c
+++ b/drivers/tty/serial/8250/8250_fsl.c
@@ -60,9 +60,18 @@ int fsl8250_handle_irq(struct uart_port *port)
@@ -169,7 +169,7 @@ index fbcc90c31ca1..b33cb454ce03 100644
port->ops->stop_rx(port);
} else {
diff --git a/drivers/tty/serial/8250/8250_ingenic.c b/drivers/tty/serial/8250/8250_ingenic.c
-index 988bf6bcce42..bcd26d672539 100644
+index 988bf6bcce42d..bcd26d6725395 100644
--- a/drivers/tty/serial/8250/8250_ingenic.c
+++ b/drivers/tty/serial/8250/8250_ingenic.c
@@ -146,6 +146,8 @@ OF_EARLYCON_DECLARE(x1000_uart, "ingenic,x1000-uart",
@@ -195,7 +195,7 @@ index 988bf6bcce42..bcd26d672539 100644
if (ier & UART_IER_MSI)
value |= UART_MCR_MDCE | UART_MCR_FCM;
diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c
-index de48a58460f4..d246f2755fed 100644
+index de48a58460f47..d246f2755feda 100644
--- a/drivers/tty/serial/8250/8250_mtk.c
+++ b/drivers/tty/serial/8250/8250_mtk.c
@@ -222,12 +222,37 @@ static void mtk8250_shutdown(struct uart_port *port)
@@ -239,7 +239,7 @@ index de48a58460f4..d246f2755fed 100644
static void mtk8250_set_flow_ctrl(struct uart_8250_port *up, int mode)
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
-index 8b49ac4856d2..947737d0e46b 100644
+index 6098e87a34046..8eee07321a560 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -730,7 +730,7 @@ static void serial8250_set_sleep(struct uart_8250_port *p, int sleep)
@@ -251,7 +251,7 @@ index 8b49ac4856d2..947737d0e46b 100644
if (p->capabilities & UART_CAP_EFR) {
serial_out(p, UART_LCR, UART_LCR_CONF_MODE_B);
serial_out(p, UART_EFR, efr);
-@@ -1405,7 +1405,7 @@ static void serial8250_stop_rx(struct uart_port *port)
+@@ -1399,7 +1399,7 @@ static void serial8250_stop_rx(struct uart_port *port)
up->ier &= ~(UART_IER_RLSI | UART_IER_RDI);
up->port.read_status_mask &= ~UART_LSR_DR;
@@ -260,7 +260,7 @@ index 8b49ac4856d2..947737d0e46b 100644
serial8250_rpm_put(up);
}
-@@ -1435,7 +1435,7 @@ void serial8250_em485_stop_tx(struct uart_8250_port *p)
+@@ -1429,7 +1429,7 @@ void serial8250_em485_stop_tx(struct uart_8250_port *p)
serial8250_clear_and_reinit_fifos(p);
p->ier |= UART_IER_RLSI | UART_IER_RDI;
@@ -269,7 +269,7 @@ index 8b49ac4856d2..947737d0e46b 100644
}
}
EXPORT_SYMBOL_GPL(serial8250_em485_stop_tx);
-@@ -1677,7 +1677,7 @@ static void serial8250_disable_ms(struct uart_port *port)
+@@ -1671,7 +1671,7 @@ static void serial8250_disable_ms(struct uart_port *port)
mctrl_gpio_disable_ms(up->gpios);
up->ier &= ~UART_IER_MSI;
@@ -278,7 +278,7 @@ index 8b49ac4856d2..947737d0e46b 100644
}
static void serial8250_enable_ms(struct uart_port *port)
-@@ -1693,7 +1693,7 @@ static void serial8250_enable_ms(struct uart_port *port)
+@@ -1687,7 +1687,7 @@ static void serial8250_enable_ms(struct uart_port *port)
up->ier |= UART_IER_MSI;
serial8250_rpm_get(up);
@@ -287,7 +287,7 @@ index 8b49ac4856d2..947737d0e46b 100644
serial8250_rpm_put(up);
}
-@@ -2129,14 +2129,7 @@ static void serial8250_put_poll_char(struct uart_port *port,
+@@ -2123,14 +2123,7 @@ static void serial8250_put_poll_char(struct uart_port *port,
struct uart_8250_port *up = up_to_u8250p(port);
serial8250_rpm_get(up);
@@ -303,7 +303,7 @@ index 8b49ac4856d2..947737d0e46b 100644
wait_for_xmitr(up, BOTH_EMPTY);
/*
-@@ -2149,7 +2142,7 @@ static void serial8250_put_poll_char(struct uart_port *port,
+@@ -2143,7 +2136,7 @@ static void serial8250_put_poll_char(struct uart_port *port,
* and restore the IER
*/
wait_for_xmitr(up, BOTH_EMPTY);
@@ -312,7 +312,7 @@ index 8b49ac4856d2..947737d0e46b 100644
serial8250_rpm_put(up);
}
-@@ -2454,7 +2447,7 @@ void serial8250_do_shutdown(struct uart_port *port)
+@@ -2448,7 +2441,7 @@ void serial8250_do_shutdown(struct uart_port *port)
*/
spin_lock_irqsave(&port->lock, flags);
up->ier = 0;
@@ -321,7 +321,7 @@ index 8b49ac4856d2..947737d0e46b 100644
spin_unlock_irqrestore(&port->lock, flags);
synchronize_irq(port->irq);
-@@ -2806,7 +2799,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
+@@ -2800,7 +2793,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
if (up->capabilities & UART_CAP_RTOIE)
up->ier |= UART_IER_RTOIE;
@@ -330,7 +330,7 @@ index 8b49ac4856d2..947737d0e46b 100644
if (up->capabilities & UART_CAP_EFR) {
unsigned char efr = 0;
-@@ -3271,7 +3264,7 @@ EXPORT_SYMBOL_GPL(serial8250_set_defaults);
+@@ -3265,7 +3258,7 @@ EXPORT_SYMBOL_GPL(serial8250_set_defaults);
#ifdef CONFIG_SERIAL_8250_CONSOLE
@@ -339,7 +339,7 @@ index 8b49ac4856d2..947737d0e46b 100644
{
struct uart_8250_port *up = up_to_u8250p(port);
-@@ -3279,6 +3272,18 @@ static void serial8250_console_putchar(struct uart_port *port, int ch)
+@@ -3273,6 +3266,18 @@ static void serial8250_console_putchar(struct uart_port *port, int ch)
serial_port_out(port, UART_TX, ch);
}
@@ -358,7 +358,7 @@ index 8b49ac4856d2..947737d0e46b 100644
/*
* Restore serial console when h/w power-off detected
*/
-@@ -3305,6 +3310,32 @@ static void serial8250_console_restore(struct uart_8250_port *up)
+@@ -3299,6 +3304,32 @@ static void serial8250_console_restore(struct uart_8250_port *up)
serial8250_out_MCR(up, up->mcr | UART_MCR_DTR | UART_MCR_RTS);
}
@@ -391,7 +391,7 @@ index 8b49ac4856d2..947737d0e46b 100644
/*
* Print a string to the serial port trying not to disturb
* any possible real use of the port...
-@@ -3321,24 +3352,12 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
+@@ -3315,24 +3346,12 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
struct uart_port *port = &up->port;
unsigned long flags;
unsigned int ier;
@@ -418,7 +418,7 @@ index 8b49ac4856d2..947737d0e46b 100644
/* check scratch reg to see if port powered off during system sleep */
if (up->canary && (up->canary != serial_port_in(port, UART_SCR))) {
-@@ -3352,7 +3371,9 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
+@@ -3346,7 +3365,9 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
mdelay(port->rs485.delay_rts_before_send);
}
@@ -428,7 +428,7 @@ index 8b49ac4856d2..947737d0e46b 100644
/*
* Finally, wait for transmitter to become empty
-@@ -3365,8 +3386,7 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
+@@ -3359,8 +3380,7 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
if (em485->tx_stopped)
up->rs485_stop_tx(up);
}
@@ -438,7 +438,7 @@ index 8b49ac4856d2..947737d0e46b 100644
/*
* The receive handling will happen properly because the
-@@ -3378,8 +3398,7 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
+@@ -3372,8 +3392,7 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
if (up->msr_saved_flags)
serial8250_modem_status(up);
@@ -448,7 +448,7 @@ index 8b49ac4856d2..947737d0e46b 100644
}
static unsigned int probe_baud(struct uart_port *port)
-@@ -3399,6 +3418,7 @@ static unsigned int probe_baud(struct uart_port *port)
+@@ -3393,6 +3412,7 @@ static unsigned int probe_baud(struct uart_port *port)
int serial8250_console_setup(struct uart_port *port, char *options, bool probe)
{
@@ -456,7 +456,7 @@ index 8b49ac4856d2..947737d0e46b 100644
int baud = 9600;
int bits = 8;
int parity = 'n';
-@@ -3408,6 +3428,8 @@ int serial8250_console_setup(struct uart_port *port, char *options, bool probe)
+@@ -3402,6 +3422,8 @@ int serial8250_console_setup(struct uart_port *port, char *options, bool probe)
if (!port->iobase && !port->membase)
return -ENODEV;
@@ -466,7 +466,7 @@ index 8b49ac4856d2..947737d0e46b 100644
uart_parse_options(options, &baud, &parity, &bits, &flow);
else if (probe)
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
-index abb928361270..77de68ed2d60 100644
+index abb928361270e..77de68ed2d606 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -7,6 +7,7 @@
@@ -496,5 +496,5 @@ index abb928361270..77de68ed2d60 100644
int serial8250_console_exit(struct uart_port *port);
--
-2.43.0
+2.44.0