From owner-freebsd-current@FreeBSD.ORG Tue Apr 6 23:23:58 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4C7D16A4CE for ; Tue, 6 Apr 2004 23:23:58 -0700 (PDT) Received: from md.gfk.ru (md.gfk.ru [62.205.179.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 638B843D46 for ; Tue, 6 Apr 2004 23:23:57 -0700 (PDT) (envelope-from Yuriy.Tsibizov@gfk.ru) Received: from mx.gfk.ru ([10.0.0.30]) by md.gfk.ru (md.gfk.ru [62.205.179.201]) (MDaemon.PRO.v6.8.5.R) with ESMTP id 37-md50000000216.tmp for ; Wed, 07 Apr 2004 10:23:09 +0400 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable X-MIMEOLE: Produced By Microsoft Exchange V6.0.5762.3 Date: Wed, 7 Apr 2004 10:23:08 +0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: dev/sound/pcm/sound.h shadows INTR_MPSAFE declaration Thread-Index: AcQb/j8ly8AeLiC8Qn+x58KOMprw3AAZf+CQ From: "Yuriy Tsibizov" To: "Doug White" X-Spam-Processed: md.gfk.ru, Wed, 07 Apr 2004 10:23:09 +0400 (not processed: message from valid local sender) X-MDRemoteIP: 10.0.0.30 X-Return-Path: Yuriy.Tsibizov@gfk.ru X-MDaemon-Deliver-To: freebsd-current@freebsd.org cc: freebsd-current@freebsd.org cc: Mathew Kanner Subject: RE: dev/sound/pcm/sound.h shadows INTR_MPSAFE declaration X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 06:23:58 -0000 > 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.