From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by ozlabs.org (Postfix) with ESMTP id 10D23DDF9E for ; Tue, 26 May 2009 02:01:18 +1000 (EST) Received: by yw-out-2324.google.com with SMTP id 2so1539943ywt.39 for ; Mon, 25 May 2009 09:01:17 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <9e4733910905250821nf433121s6c161d3f2104b453@mail.gmail.com> References: <20090525013849.3073.96729.stgit@terra> <20090525102647.GD18290@sirena.org.uk> <9e4733910905250821nf433121s6c161d3f2104b453@mail.gmail.com> From: Grant Likely Date: Mon, 25 May 2009 10:00:57 -0600 Message-ID: Subject: Re: [PATCH V3 2/4] AC97 driver for mpc5200 To: Jon Smirl Content-Type: text/plain; charset=ISO-8859-1 Cc: linuxppc-dev@ozlabs.org, alsa-devel@alsa-project.org, Mark Brown List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, May 25, 2009 at 9:21 AM, Jon Smirl wrote: > On Mon, May 25, 2009 at 6:26 AM, Mark Brown > wrote: >>> + =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); >>> + =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.