From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 19:20:09 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 226F210656F8; Mon, 9 Feb 2009 19:20:09 +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 C05088FC12; Mon, 9 Feb 2009 19:20:08 +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 n19JK3Mv048520; Mon, 9 Feb 2009 12:20:03 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <499081E3.9050009@samsco.org> Date: Mon, 09 Feb 2009 12:20:03 -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: Marcel Moolenaar References: <200902082254.n18MsxVt037307@svn.freebsd.org> <200902090923.45887.jhb@freebsd.org> <2EA5FEEB-E676-4D1B-9700-399C783F4590@mac.com> <200902091342.16078.jhb@freebsd.org> <0AA26479-B36A-4412-BF2B-7D4C573BC266@mac.com> In-Reply-To: <0AA26479-B36A-4412-BF2B-7D4C573BC266@mac.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, src-committers@FreeBSD.org, "M. Warner Losh" , John Baldwin Subject: Re: svn commit: r188350 - in head/sys: amd64/amd64 arm/arm dev/usb2/core i386/i386 ia64/ia64 sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2009 19:20:10 -0000 Marcel Moolenaar wrote: > > On Feb 9, 2009, at 10:42 AM, John Baldwin wrote: > >>>> 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? >> >> All of the platforms that do bounce buffering will honor this. If a >> given >> platform doesn't support bounce buffering then I imagine it will fail >> misaligned requests with an error. It would probably make it easier to >> support bounce buffering on more platforms if some of the support code >> for >> managing bounce zones could be moved into a subr_busdma.c or the like >> since >> much of it is copy and pasted. > > Very much agreed with the unification in subr_busdma.c. > > If the shared implementation then grows a IOMMU interface, > then platforms with a IOMMU can avoid bounce buffering > when possible (i.e. no re-alignment is needed or enough > free IOMMU mappings exist to avoid the bounce buffering). > Yes, this work in progress. Scott