diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:28:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:28:00 +0000 |
commit | 3565071f226432336a54d0193d729fa4508a3394 (patch) | |
tree | 4cde13f078f84c0a7785d234fd52edce7c90546a /debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch | |
parent | Adding upstream version 6.6.15. (diff) | |
download | linux-3565071f226432336a54d0193d729fa4508a3394.tar.xz linux-3565071f226432336a54d0193d729fa4508a3394.zip |
Adding debian version 6.6.15-2.debian/6.6.15-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch')
-rw-r--r-- | debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch b/debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch new file mode 100644 index 0000000000..32ff14fba0 --- /dev/null +++ b/debian/patches-rt/tty_serial_pl011__Make_the_locking_work_on_RT.patch @@ -0,0 +1,46 @@ +Subject: tty/serial/pl011: Make the locking work on RT +From: Thomas Gleixner <tglx@linutronix.de> +Date: Tue Jan 8 21:36:51 2013 +0100 +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.6/older/patches-6.6.7-rt18.tar.xz + +From: Thomas Gleixner <tglx@linutronix.de> + +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 <tglx@linutronix.de> + + +--- + drivers/tty/serial/amba-pl011.c | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) +--- +--- a/drivers/tty/serial/amba-pl011.c ++++ b/drivers/tty/serial/amba-pl011.c +@@ -2332,13 +2332,10 @@ pl011_console_write(struct console *co, + + clk_enable(uap->clk); + +- local_irq_save(flags); +- if (uap->port.sysrq) +- locked = 0; +- else if (oops_in_progress) +- locked = uart_port_trylock(&uap->port); ++ if (uap->port.sysrq || oops_in_progress) ++ locked = uart_port_trylock_irqsave(&uap->port, &flags); + else +- uart_port_lock(&uap->port); ++ uart_port_lock_irqsave(&uap->port, &flags); + + /* + * First save the CR then disable the interrupts +@@ -2364,8 +2361,7 @@ pl011_console_write(struct console *co, + pl011_write(old_cr, uap, REG_CR); + + if (locked) +- uart_port_unlock(&uap->port); +- local_irq_restore(flags); ++ uart_port_unlock_irqrestore(&uap->port, flags); + + clk_disable(uap->clk); + } |