Commit 29504810 authored by Ingo Molnar's avatar Ingo Molnar Committed by Thomas Gleixner

drivers/serial: Clean up the locking for -rt

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 99c5059e
...@@ -2729,14 +2729,10 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) ...@@ -2729,14 +2729,10 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
touch_nmi_watchdog(); touch_nmi_watchdog();
local_irq_save(flags); if (up->port.sysrq || oops_in_progress)
if (up->port.sysrq) { locked = spin_trylock_irqsave(&up->port.lock, flags);
/* serial8250_handle_port() already took the lock */ else
locked = 0; spin_lock_irqsave(&up->port.lock, flags);
} else if (oops_in_progress) {
locked = spin_trylock(&up->port.lock);
} else
spin_lock(&up->port.lock);
/* /*
* First save the IER then disable the interrupts * First save the IER then disable the interrupts
...@@ -2768,8 +2764,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) ...@@ -2768,8 +2764,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
check_modem_status(up); check_modem_status(up);
if (locked) if (locked)
spin_unlock(&up->port.lock); spin_unlock_irqrestore(&up->port.lock, flags);
local_irq_restore(flags);
} }
static int __init serial8250_console_setup(struct console *co, char *options) static int __init serial8250_console_setup(struct console *co, char *options)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment