5 Mar
2012
5 Mar
'12
2:04 a.m.
On Sun, Mar 04, 2012 at 11:32:50PM +0000, Tabi Timur-B04825 wrote:
Russell King - ARM Linux wrote:
Is the SCR shared between capture and playback? In that case, what makes this read-modify-write thread safe?
What's "SCR"?
I assumed you knew the code you were commenting on.
clrbits32(&ssi->scr, CCSR_SSI_SCR_SSIEN);
The register these functions seem to be used on appears to be called 'SCR'.
It's not thread-safe on PPC, but then neither is the entire function. You can't have two threads attempt to initialize the hardware at the same time.
Why do you say "can't" - what prevents it? If nothing, then this stuff is buggy when preempt is enabled, or you're running on SMP.