From owner-freebsd-arch@FreeBSD.ORG Tue Sep 5 17:33:35 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F017416A4DD; Tue, 5 Sep 2006 17:33:35 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9822E43D45; Tue, 5 Sep 2006 17:33:35 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (ykq2v6x1kjxn0o2l@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id k85HXZku045282; Tue, 5 Sep 2006 10:33:35 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id k85HXZJ7045281; Tue, 5 Sep 2006 10:33:35 -0700 (PDT) (envelope-from jmg) Date: Tue, 5 Sep 2006 10:33:35 -0700 From: John-Mark Gurney To: freebsd-arch@FreeBSD.org, freebsd-drivers@FreeBSD.org, freebsd-current@FreeBSD.org Message-ID: <20060905173334.GH9421@funkthat.com> Mail-Followup-To: freebsd-arch@FreeBSD.org, freebsd-drivers@FreeBSD.org, freebsd-current@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: Subject: bus_get_dma_tag now necessary for drivers using bus_dma X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2006 17:33:36 -0000 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."