From owner-freebsd-arch@FreeBSD.ORG Tue Jun 17 15:32:12 2003 Return-Path: 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 41B2937B40F for ; Tue, 17 Jun 2003 15:32:12 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB02543FBD for ; Tue, 17 Jun 2003 15:32:11 -0700 (PDT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id B6C982ED416; Tue, 17 Jun 2003 15:32:11 -0700 (PDT) Date: Wed, 18 Jun 2003 00:32:11 +0200 From: Maxime Henrion To: Harti Brandt , arch@freebsd.org Message-ID: <20030617223211.GT21011@elvis.mu.org> References: <20030617124004.Y77677@beagle.fokus.fraunhofer.de> <20030617115330.GS21011@elvis.mu.org> <20030617180644.GL73854@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030617180644.GL73854@funkthat.com> User-Agent: Mutt/1.4.1i Subject: Re: busdma sync problem X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2003 22:32:12 -0000 John-Mark Gurney wrote: > Maxime Henrion wrote this message on Tue, Jun 17, 2003 at 13:53 +0200: > > whole map. However, I believe it would be more beneficial at this point > > in time to try to make our busdma API as close as NetBSD's one as > > possible. I bet we'll end up using more macros, as the NetBSD folks do > > Actually, right now, our bus/device interface is so far away that it'll > take a lot of work. NetBSD shares bus_tag's between DMA and bus_space, > so w/ FreeBSD, you already have to add a bus dma tag for each bus dmamap > that you use in the driver. The dmamap is not an opaque type and you > do not require callbacks to get the address for each segment. I am well aware of how our busdma API and NetBSD's one diverge. > Sure you can start with some small things, but I don't think these are > a big deal, (heck it might even confuse some people), till the rest of > the bus_dma interface has been "merged". The current goal is to merge with NetBSD rather than diverge, so it is meaningful to have bus_dmamap_sync() be the same, especially if you consider that bus_dmamap_sync() is a function that we call very often in the busdma aware drivers. Furthermore, since what we are talking about now isn't even implemented, it doesn't cost us much to implement it the NetBSD's way. The only drawback is that we'll have to change the existing busdma drivers, and we don't have so many busdma drivers, plus it's a mechanical change... Cheers, Maxime