Thread (42 messages) 42 messages, 3 authors, 2018-10-18

[PATCH V4 05/11] clk: imx: scu: add scu clock gate

From: aisheng.dong@nxp.com (A.s. Dong)
Date: 2018-10-17 07:28:49
Also in: linux-clk

From: Stephen Boyd [mailto:sboyd at kernel.org]
Sent: Wednesday, October 17, 2018 5:19 AM
[...]
quoted
" Drivers don't need to manually protect resources shared between the
operations of one group, regardless of whether those resources are
shared by multiple clocks or not. However, access to resources that
are shared between operations of the two groups needs to be protected by
the drivers."
quoted
Do you think it's okay to drop it?
No it's not OK. We prefer that clk drivers don't assume the global locks in the
clk framework are going to protect them from concurrent access to the same
resource between different clks. Drivers can assume that a clk op won't be
called in parallel for the same clk, but they shouldn't assume that everything is
protected otherwise. If they did, we would have to go find all the drivers that
make this assumption and then fix them when we eventually split the lock into
smaller pieces.

Long story short, if you have something shared (i.e. a register) and you plan to
write to it and read from it for multiple clks, add a lock around it.
Okay, got it. Appreciated for the detailed explanation.

Regards
Dong Aisheng
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help