Thread (80 messages) 80 messages, 20 authors, 2011-01-28

Re: Locking in the clk API

From: Russell King - ARM Linux <hidden>
Date: 2011-01-27 08:55:24
Also in: linux-arm-kernel, lkml

On Wed, Jan 26, 2011 at 08:34:20PM -0800, Saravana Kannan wrote:
I'm not too familiar with serial/tty, does anyone know if the  
.set_termios needs to be atmoic? If not, we could just change  
cpm_uart/cpm_uart_core.c to use mutex instead of spinlock.
The locking is there to protect against the interrupt handler accessing
the port->* stuff (which seems to have been forgotten by the cpm driver).

I don't see any reason why clk_set_rate() needs to be under the spinlock
there - we need the reprogramming of the baud rate within the spinlock
on 8250 because of DLAB bit hiding the data registers.  It's also a good
idea that it _is_ within the spinlock along with uart_update_timeout()
to ensure timeouts and the baud rate are updated together.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help