lkml.org 
[lkml]   [2011]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] MXS: Convert mutexes in clock.c to spinlocks
On Sun, Dec 18, 2011 at 03:06:13PM +0100, Marek Vasut wrote:
> The mutexes can't be safely used under certain circumstances. I noticed this
> issue during some network instability at home:
>
Yes, this is a known issue. And there was some discussion[1] about
why mutex is needed. But I really have not thought about why we can
not use spinlock only, since using mutex only leads to the issue we
are seeing here, and using spinlock in enable/disable and mutex in
rate/parent will not work, because the mxs clocks have enable/disable
and rate/parent functions access the same register. I know it's not
good to hold spinlock in rate/parent functions for a long time, but
do we have a way around rather than using spinlock for both sets of
functions?

--
Regards,
Shawn

[1] http://thread.gmane.org/gmane.linux.ports.arm.kernel/137282



\
 
 \ /
  Last update: 2011-12-19 04:17    [W:0.093 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site