From: Takashi Iwai Subject: Re: sparc dbri: SMP fixes Date: Fri, 01 Sep 2006 12:30:38 +0200 Message-ID: References: <44f7dd09db938@wp.pl> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <44f7dd09db938@wp.pl> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: Krzysztof Helt Cc: alsa-devel List-Id: alsa-devel@alsa-project.org At Fri, 01 Sep 2006 09:11:05 +0200, Krzysztof Helt wrote: > > @@ -672,10 +678,10 @@ static s32 *dbri_cmdlock(struct snd_dbri > * The JUMP cmd points to the new cmd string. > * It also releases the cmdlock spinlock. > */ > -static void dbri_cmdsend(struct snd_dbri * dbri, s32 * cmd,int len) > +static void dbri_cmdsend(struct snd_dbri * dbri, s32 * cmd,int len,int lock) There is only one place that calls dbri_cmdsend(lock=0), namely xmit_fixed(). Hence, I suggest not to add this argument but just add spin_lock_irqsave()/spin_unlock_irqrestore() around the calling side in xmit_fixed(). The spinlock per argument is hard to trace whether the lock is really needed or not. Otherwise the patch looks fine. Thanks, Takashi ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642