From b15a952c52a6825376d3e7f6c1bf5c886c6d8b74 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 12:06:00 +0200 Subject: Adding debian version 5.10.209-2. Signed-off-by: Daniel Baumann --- ...tty-serial-omap-Make-the-locking-RT-aware.patch | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 debian/patches-rt/0266-tty-serial-omap-Make-the-locking-RT-aware.patch (limited to 'debian/patches-rt/0266-tty-serial-omap-Make-the-locking-RT-aware.patch') diff --git a/debian/patches-rt/0266-tty-serial-omap-Make-the-locking-RT-aware.patch b/debian/patches-rt/0266-tty-serial-omap-Make-the-locking-RT-aware.patch new file mode 100644 index 000000000..e926c5ed8 --- /dev/null +++ b/debian/patches-rt/0266-tty-serial-omap-Make-the-locking-RT-aware.patch @@ -0,0 +1,49 @@ +From c436953e83166f6588469c76032a7038a50cc585 Mon Sep 17 00:00:00 2001 +From: Thomas Gleixner +Date: Thu, 28 Jul 2011 13:32:57 +0200 +Subject: [PATCH 266/323] tty/serial/omap: Make the locking RT aware +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.204-rt100.tar.xz + +The lock is a sleeping lock and local_irq_save() is not the +optimsation we are looking for. Redo it to make it work on -RT and +non-RT. + +Signed-off-by: Thomas Gleixner +--- + drivers/tty/serial/omap-serial.c | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) + +diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c +index 84e8158088cd..342005ed5ebf 100644 +--- a/drivers/tty/serial/omap-serial.c ++++ b/drivers/tty/serial/omap-serial.c +@@ -1311,13 +1311,10 @@ serial_omap_console_write(struct console *co, const char *s, + + pm_runtime_get_sync(up->dev); + +- local_irq_save(flags); +- if (up->port.sysrq) +- locked = 0; +- else if (oops_in_progress) +- locked = spin_trylock(&up->port.lock); ++ if (up->port.sysrq || oops_in_progress) ++ locked = spin_trylock_irqsave(&up->port.lock, flags); + else +- spin_lock(&up->port.lock); ++ spin_lock_irqsave(&up->port.lock, flags); + + /* + * First save the IER then disable the interrupts +@@ -1346,8 +1343,7 @@ serial_omap_console_write(struct console *co, const char *s, + pm_runtime_mark_last_busy(up->dev); + pm_runtime_put_autosuspend(up->dev); + if (locked) +- spin_unlock(&up->port.lock); +- local_irq_restore(flags); ++ spin_unlock_irqrestore(&up->port.lock, flags); + } + + static int __init +-- +2.43.0 + -- cgit v1.2.3