From owner-svn-src-head@FreeBSD.ORG Mon Feb 9 18:51:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D8D0106566B; Mon, 9 Feb 2009 18:51:37 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id BF8478FC1D; Mon, 9 Feb 2009 18:51:36 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n19IpURQ048344; Mon, 9 Feb 2009 11:51:31 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <49907B32.8080307@samsco.org> Date: Mon, 09 Feb 2009 11:51:30 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: "M. Warner Losh" References: <94616FBD-4638-4C51-990C-06A943B1BA2A@mac.com> <200902090923.45887.jhb@freebsd.org> <2EA5FEEB-E676-4D1B-9700-399C783F4590@mac.com> <20090209.113053.65361811.imp@bsdimp.com> In-Reply-To: <20090209.113053.65361811.imp@bsdimp.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, xcllnt@mac.com, src-committers@freebsd.org, jhb@freebsd.org Subject: Re: svn commit: r188350 - in head/sys: amd64/amd64 arm/arm dev/usb2/core i386/i386 ia64/ia64 sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2009 18:51:37 -0000 M. Warner Losh wrote: > In message: <2EA5FEEB-E676-4D1B-9700-399C783F4590@mac.com> > Marcel Moolenaar writes: > : > : On Feb 9, 2009, at 6:23 AM, John Baldwin wrote: > : > : > On Monday 09 February 2009 12:37:53 am Marcel Moolenaar wrote: > : >> > : >> On Feb 8, 2009, at 5:00 PM, Scott Long wrote: > : >> > : >>> Busdma allows you to request bouncing for realignment. > : >> > : >> How exactly? > : > > : > The 'align' parameter to bus_dma_tag_create(). If your hardware > : > needs buffers > : > to be aligned on a 4-byte boundary and you bus_dmamap_load() a buffer > : > where 'addr % 4 != 0', then the buffer is bounced. Since by default > : > the new > : > buffer starts on a page boundary, it satifies the 'addr % 4'. > : > : But according to the man page, bounce buffering may not > : be implemented or not be applicable to a platform. It > : seems to me that you cannot depend on this side-effect > : in a generic driver. Are you guys talking only in terms > : of i386 or is this generally applicable? > > There's no bounce buffering on MIPS right now, for example... There > likely should be, but it isn't there now. > > Warner So yes, it's only available really on amd64 and i386 at the moment. No reason why it can't be available elsewhere, and I'm working on factoring all of the bounce logic out into an MD file so it can be made available. For architectures that use an IOMMU, there's probably no reason why re-alignment can't use the IOMMU instead of bouncing. Scott