Thread (10 messages) 10 messages, 4 authors, 2012-06-19

Re: [RFC PATCH] pch_uart: Add eg20t_port lock field, avoid recursive spinlocks

From: Tomoya MORINAGA <hidden>
Date: 2012-06-01 08:30:52
Also in: lkml

On Thu, May 31, 2012 at 5:54 PM, Darren Hart [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -1376,7 +1379,8 @@ static void pch_uart_set_termios(struct uart_port *port,
       baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk / 16);

-       spin_lock_irqsave(&port->lock, flags);
+       spin_lock_irqsave(&priv->lock, flags);
+       spin_lock(&port->lock);

       uart_update_timeout(port, termios->c_cflag, baud);
       rtn = pch_uart_hal_set_line(priv, baud, parity, bits, stb);
@@ -1389,7 +1393,8 @@ static void pch_uart_set_termios(struct uart_port *port,
               tty_termios_encode_baud_rate(termios, baud, baud);

 out:
-       spin_unlock_irqrestore(&port->lock, flags);
+       spin_unlock(&port->lock);
+       spin_unlock_irqrestore(&priv->lock, flags);
 }
Are both port->lock and priv->lock really necessary ?

quoted hunk ↗ jump to hunk
@@ -1572,7 +1578,9 @@ pch_console_write(struct console *co, const char *s, unsigned int count)
       if (locked)
               spin_unlock(&priv->port.lock);
+       spin_unlock(&priv->lock);
       local_irq_restore(flags);
+
 }
Looks spare blank line.

thanks.
-- 
ROHM Co., Ltd.
tomoya
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help