Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26650
b: refs/heads/master
c: d8a5a8d
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed May 2, 2006
1 parent 23c5435 commit 96eeb4f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a88d75b257b2b28b26d7d4d2b640f05feb00ad53
refs/heads/master: d8a5a8d7cc32e4474326e0ecc1b959063490efc9
10 changes: 10 additions & 0 deletions trunk/drivers/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -2235,10 +2235,17 @@ static void
serial8250_console_write(struct console *co, const char *s, unsigned int count)
{
struct uart_8250_port *up = &serial8250_ports[co->index];
unsigned long flags;
unsigned int ier;
int locked = 1;

touch_nmi_watchdog();

if (oops_in_progress) {
locked = spin_trylock_irqsave(&up->port.lock, flags);
} else
spin_lock_irqsave(&up->port.lock, flags);

/*
* First save the IER then disable the interrupts
*/
Expand All @@ -2257,6 +2264,9 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
*/
wait_for_xmitr(up, BOTH_EMPTY);
serial_out(up, UART_IER, ier);

if (locked)
spin_unlock_irqrestore(&up->port.lock, flags);
}

static int serial8250_console_setup(struct console *co, char *options)
Expand Down

0 comments on commit 96eeb4f

Please sign in to comment.