summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/serial-8250-remove-that-trylock-in-serial8250_consol.patch
blob: 48f8fca0192353720b6793c13c661a85920b1b72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 14 Feb 2019 17:38:24 +0100
Subject: [PATCH] serial: 8250: remove that trylock in
 serial8250_console_write_atomic()
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz

This does not work as rtmutex in NMI context. As per John, it is not
needed.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/tty/serial/8250/8250_port.c |   11 -----------
 1 file changed, 11 deletions(-)

--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -3187,17 +3187,9 @@ void serial8250_console_write_atomic(str
 {
 	struct uart_port *port = &up->port;
 	unsigned int flags;
-	bool locked;
 
 	console_atomic_lock(&flags);
 
-	/*
-	 * If possible, keep any other CPUs from working with the
-	 * UART until the atomic message is completed. This helps
-	 * to keep the output more orderly.
-	 */
-	locked = spin_trylock(&port->lock);
-
 	touch_nmi_watchdog();
 
 	clear_ier(up);
@@ -3212,9 +3204,6 @@ void serial8250_console_write_atomic(str
 	wait_for_xmitr(up, BOTH_EMPTY);
 	restore_ier(up);
 
-	if (locked)
-		spin_unlock(&port->lock);
-
 	console_atomic_unlock(flags);
 }