Thread (22 messages) 22 messages, 4 authors, 2009-05-28

Re: [PATCH V3 2/4] AC97 driver for mpc5200

From: Grant Likely <hidden>
Date: 2009-05-25 16:01:18
Also in: alsa-devel

On Mon, May 25, 2009 at 9:21 AM, Jon Smirl [off-list ref] wrote:
On Mon, May 25, 2009 at 6:26 AM, Mark Brown
[off-list ref] wrote:
quoted
quoted
+ =A0 =A0 =A0 =A0 =A0 =A0 spin_lock(&psc_dma->lock);
+ =A0 =A0 =A0 =A0 =A0 =A0 out_be32(&psc_dma->psc_regs->ac97_slots, psc_=
dma->slots);
quoted
quoted
+ =A0 =A0 =A0 =A0 =A0 =A0 spin_unlock(&psc_dma->lock);
+ =A0 =A0 =A0 =A0 =A0 =A0 break;
This locking looks wrong - I'd expect it to also cover the modification
of psc_dma->slots? =A0Otherwise it's hard to see what it buys you.
Grant, why are you spin locking around register access?
This lock/unlock is definitely bogus since a single register access is
already atomic.  Are there places in the code that I wrote where a
spin_lock/unlock is done around a single register access?

g.

--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help