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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 25, 2009 at 9:21 AM, Jon Smirl <jonsmirl@xxxxxxxxx> wrote:
> On Mon, May 25, 2009 at 6:26 AM, Mark Brown
> <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>>> +             spin_lock(&psc_dma->lock);
>>> +             out_be32(&psc_dma->psc_regs->ac97_slots, psc_dma->slots);
>>> +             spin_unlock(&psc_dma->lock);
>>> +             break;
>>
>> This locking looks wrong - I'd expect it to also cover the modification
>> of psc_dma->slots?  Otherwise 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.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux