public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Pfiffer <andyp@osdl.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 2.5.29: some compilation fixes for irq frenzy [OSS + i8x0 audio]
Date: 31 Jul 2002 14:50:02 -0700	[thread overview]
Message-ID: <1028152202.964.84.camel@andyp> (raw)
In-Reply-To: <1028069255.8510.46.camel@irongate.swansea.linux.org.uk>

On Tue, 2002-07-30 at 15:47, Alan Cox wrote:
> On Tue, 2002-07-30 at 22:19, Andy Pfiffer wrote:
> > As luck would have it, I booted the kernel and played the tunes on a
> > 2-way P4 Xeon system.  Nothing wedged, but then again, I didn't try to
> > break it.
> > 
> > So, what did I break?
> 
> SMP support I think. A lot of the save_flags/cli stuff you changed looks
> like it needs to also lock out interrupts on the other processors,
> otherwise you can get a DMA pointer being updated under you.

After reading the code in question, it appears to me that the existing
save_flags/cli constructs are being used to atomically query/modify
elements of an audio_devs[N] entry.  I can see how it might be possible
for the patch to break SMP.

Would a spinlock_t for each "struct audio_operations" be the preferred
solution over, say, a global spinlock_t for all "struct
audio_operations?"

And while I'm asking: I'm a bit perplexed by the "naked" sti()'s in
audio_write() and audio_read() for the case where CNV_MU_LAW conversion
is required.  The intent appears to be to force interrupts back on
during the format conversion.  I don't see any corresponding cli() on
the return path, however.

Does anyone have any idea why those sti()'s just seem to be stuck there?

Regards,
Andy



  parent reply	other threads:[~2002-07-31 21:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-30 20:56 [PATCH] 2.5.29: some compilation fixes for irq frenzy [OSS + i8x0 audio] Andy Pfiffer
2002-07-30 22:25 ` Alan Cox
2002-07-30 21:19   ` Andy Pfiffer
2002-07-30 22:47     ` Alan Cox
2002-07-30 21:35       ` Andy Pfiffer
2002-07-31 21:50       ` Andy Pfiffer [this message]
2002-08-01  0:08         ` Alan Cox
2002-07-31 23:02           ` Dave Jones
2002-08-01  0:41             ` Alan Cox
2002-08-01  0:08         ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1028152202.964.84.camel@andyp \
    --to=andyp@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox