From owner-freebsd-current@FreeBSD.ORG Tue Sep 5 17:55:24 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 0E01316A4E0; Tue, 5 Sep 2006 17:55:24 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8932843D68; Tue, 5 Sep 2006 17:55:22 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from ns1.feral.com (localhost [127.0.0.1]) by ns1.feral.com (8.13.6/8.13.6) with ESMTP id k85HtLjD005109; Tue, 5 Sep 2006 10:55:21 -0700 (PDT) (envelope-from mjacob@freebsd.org) Received: from localhost (mjacob@localhost) by ns1.feral.com (8.13.6/8.13.6/Submit) with ESMTP id k85HtLai005106; Tue, 5 Sep 2006 10:55:21 -0700 (PDT) (envelope-from mjacob@freebsd.org) X-Authentication-Warning: ns1.feral.com: mjacob owned process doing -bs Date: Tue, 5 Sep 2006 10:55:21 -0700 (PDT) From: mjacob@freebsd.org X-X-Sender: mjacob@ns1.feral.com To: John-Mark Gurney In-Reply-To: <20060905173334.GH9421@funkthat.com> Message-ID: <20060905105320.S4962@ns1.feral.com> References: <20060905173334.GH9421@funkthat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-current@freebsd.org, freebsd-drivers@freebsd.org, freebsd-arch@freebsd.org Subject: Re: bus_get_dma_tag now necessary for drivers using bus_dma X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthew Jacob List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2006 17:55:24 -0000 A __FreeBSD_version value of 700020 can be used in your drivers to distinguish the OS source that has the requirement and that which doesn't. On Tue, 5 Sep 2006, John-Mark Gurney wrote: > Over the weekend, I integrated some infastructure from the sun4v port. > It is the ability to have different bus_dma_tag_t's for different > parts of the device tree. This is necessary on systems like sparc64 > and sun4v that have different IOMMU's for different pci domains. > sparc64 glossed over this difference by programming both IOMMU's > exactly the same, but I decided to fix this for sun4v. > > This means that for each call to bus_dma_tag_create, instead of passing > a NULL pointer, you should call bus_get_dma_tag(yourdev) and use that > as the parent tag. I committed some example code to various drivers, > such as ahc, ata, em, and ohci. > > There is currently no functional change to the tree w/ this change. > > The driver changes will need to be done by hand as the device_t of the > current device is not always obviously available at the time > bus_dma_tag_create is called. > > Patches are welcome for the remaining unconverted drivers. > > -- > John-Mark Gurney Voice: +1 415 225 5579 > > "All that I will do, has been done, All that I have, has not." > _______________________________________________ > freebsd-drivers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers > To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org" >