|
@@ -2886,14 +2886,10 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
|
|
|
|
|
|
touch_nmi_watchdog();
|
|
touch_nmi_watchdog();
|
|
|
|
|
|
- local_irq_save(flags);
|
|
|
|
- if (port->sysrq) {
|
|
|
|
- /* serial8250_handle_irq() already took the lock */
|
|
|
|
- locked = 0;
|
|
|
|
- } else if (oops_in_progress) {
|
|
|
|
- locked = spin_trylock(&port->lock);
|
|
|
|
- } else
|
|
|
|
- spin_lock(&port->lock);
|
|
|
|
|
|
+ if (port->sysrq || oops_in_progress)
|
|
|
|
+ locked = spin_trylock_irqsave(&port->lock, flags);
|
|
|
|
+ else
|
|
|
|
+ spin_lock_irqsave(&port->lock, flags);
|
|
|
|
|
|
/*
|
|
/*
|
|
* First save the IER then disable the interrupts
|
|
* First save the IER then disable the interrupts
|
|
@@ -2925,8 +2921,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
|
|
serial8250_modem_status(up);
|
|
serial8250_modem_status(up);
|
|
|
|
|
|
if (locked)
|
|
if (locked)
|
|
- spin_unlock(&port->lock);
|
|
|
|
- local_irq_restore(flags);
|
|
|
|
|
|
+ spin_unlock_irqrestore(&port->lock, flags);
|
|
}
|
|
}
|
|
|
|
|
|
static int __init serial8250_console_setup(struct console *co, char *options)
|
|
static int __init serial8250_console_setup(struct console *co, char *options)
|