Date: Wed, 7 Apr 2004 10:23:08 +0400 From: "Yuriy Tsibizov" <Yuriy.Tsibizov@gfk.ru> To: "Doug White" <dwhite@gumbysoft.com> Cc: Mathew Kanner <mat@cnd.mcgill.ca> Subject: RE: dev/sound/pcm/sound.h shadows INTR_MPSAFE declaration Message-ID: <C192C8912E798F4399668791C8965190674FD7@mx.hhp.local>
next in thread | raw e-mail | index | archive | help
> From: Doug White [mailto:dwhite@gumbysoft.com] > On Tue, 6 Apr 2004, Yuriy Tsibizov wrote: >=20 > > > > Today I've noticied that my driver is marked as Giant-locked: > > > > > > Is it actually MPSAFE? If so, feel free to mark it as such, > > > although pcm > > > isn't fully locked yet, so we take no responsibility for=20 > any damage > > > caused :) > > > > Some sound drivers in -CURRENT allocate interrupts with INTR_MPSAFE. > > The problem is that after including dev/sound/pcm/sound.h=20 > INTR_MPSAFE no longer equals to 512, but it is set to 0. And=20 > if sound driver interrupt was allocated as=20 > INTR_TYPE_AV|INTR_MPSAFE it will be marked only as INTR_TYPE_TTY. >=20 > Ever think that might be intentional? :) I'd poke=20 > -multimedia to get the > sound driver folks, though. Exactly the same piece of code exist on RELENG_4 branch. I think it was = used to allow INTR_MPSAFE|INTR_TYPE_AV inside sound drivers in 4.x, where INTR_MPSAFE and INTR_TYPE_AV are not defined. If PCM subsystem in 5.x requires that sound drivers should not mark = interrupts as INTR_MPSAFE it can be done in less ambiguous way, like = this: -sound.h- /*=20 * PCM subsystem in not fully locked. * This should force use of Giant lock for sound drivers * even when they claim to be MPSAFE. */ #ifndef I_THINK_THAT_PCM_IS_MPSAFE #define INTR_MPSAFE 0 #endif -sound.h- and remove wrong #ifdef INTR_MPSAFE checks, because INTR_MPSAFE was = never defined. On RELENG_4 it can be replaced with=20 FreeBSD version check. Yuriy.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C192C8912E798F4399668791C8965190674FD7>