From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: echoaudio.c, Revision 1.6 Date: Mon, 14 Mar 2005 18:30:13 +0100 Message-ID: References: <20050312123215.0d9e8d94.pochini@shiny.it> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII In-Reply-To: Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Clemens Ladisch Cc: Giuliano Pochini , Alsa-devel List-Id: alsa-devel@alsa-project.org At Mon, 14 Mar 2005 09:19:28 +0100 (MET), Clemens Ladisch wrote: > > Giuliano Pochini wrote: > > I'm a bit confused about the latest changes to pci/echoaudio/echoaudio.c > > > > The CVS interface says: "Use spin_lock_irqsave() instead of spin_lock() in > > places where we could be interrupted by another hardware interrupt that > > could call the rawmidi trigger callback that could try to take the same > > lock." > > > > But in snd_echo_interrupt() we are running in hard irq context, so we know > > irqs are already disabled. > > Only the sound card interrupt itself is disabled. It is architecture- > specific whether other interrupts are disabled. > > > Then: "Additionally, remove locking code that is no longer needed now that > > the trigger callback is no longer called recursively from the rawmidi > > "event" handler." > > > > Your patch does not remove anything. > > It removed code in some other files. > > > It only replaces spin_lock() in pcm_trigger() which is a stupid > > bug of mine, sorry. > > I think this wasn't a bug because the trigger callback is already > called with interrupts disabled, AFAICS. I'm planning to revert most > of these locking changes when I've proven that it's safe. I fixed snd_pcm_suspend*() functions to do in irq disabled. So, all calls of trigger and pointer callbacks are atomic now. Takashi ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click