From owner-freebsd-questions@FreeBSD.ORG Sat Oct 14 23:50:05 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AEF8F16A403 for ; Sat, 14 Oct 2006 23:50:05 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3695B43D49 for ; Sat, 14 Oct 2006 23:50:04 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from localhost (c-71-60-174-60.hsd1.pa.comcast.net [71.60.174.60]) (AUTH: LOGIN wmoran, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Sat, 14 Oct 2006 19:50:03 -0400 id 00056403.453177AC.00013F4E Date: Sat, 14 Oct 2006 19:50:02 -0400 From: Bill Moran To: usleepless@gmail.com Message-Id: <20061014195002.8dfb46ac.wmoran@collaborativefusion.com> In-Reply-To: References: Organization: Collaborative Fusion X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Removing Giant from a driver X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Oct 2006 23:50:05 -0000 You might do better by subscribing to hackers@ and posting there. This question is a little more technical than this list usually deals with. usleepless@gmail.com wrote: > Hi All, > > i have been tweaking the pvr250 driver to support pvr150s/500s. now i > want to remove Giant from the code. > > problem is, i am not sure what to do. i have created a mutex which > replaces the spltty and splx calls. but this crashes my box :-) > > the original code looks like this: > /* > * Allocate a DMA tag for the scatter / gather list. > */ > error = bus_dma_tag_create(sc->parent_dmat, 1, 0, > BUS_SPACE_MAXADDR_32BIT, > BUS_SPACE_MAXADDR, NULL, NULL, > CXM_SG_BUFFERS > * sizeof(struct cxm_sg_entry), 1, > BUS_SPACE_MAXSIZE_32BIT, 0, > #if __FreeBSD_version >= 501102 > busdma_lock_mutex, &Giant, > #endif > &sc->enc_sg.dmat); > > what should it look like? > > and how will i prevent the interrupt routine from interfering with > userland operations? can i place a "mtx_lock()" call in the interrupt > routine? > > is there a howto somewhere? > > regards, > > usleep > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- Bill Moran Many miles away, something crawls through the slime at the bottom of a dark, Scottish lake.