From owner-svn-src-head@FreeBSD.ORG Mon Feb 9 18:43:42 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 E88DD106566B; Mon, 9 Feb 2009 18:43:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B5C938FC12; Mon, 9 Feb 2009 18:43:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 2C6E346B23; Mon, 9 Feb 2009 13:43:42 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n19IhZit005666; Mon, 9 Feb 2009 13:43:36 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Marcel Moolenaar Date: Mon, 9 Feb 2009 13:42:15 -0500 User-Agent: KMail/1.9.7 References: <200902082254.n18MsxVt037307@svn.freebsd.org> <200902090923.45887.jhb@freebsd.org> <2EA5FEEB-E676-4D1B-9700-399C783F4590@mac.com> In-Reply-To: <2EA5FEEB-E676-4D1B-9700-399C783F4590@mac.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902091342.16078.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 09 Feb 2009 13:43:36 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8968/Mon Feb 9 10:06:24 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, Scott Long , src-committers@freebsd.org, svn-src-all@freebsd.org, "M. Warner Losh" 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:43:44 -0000 On Monday 09 February 2009 12:51:28 pm Marcel Moolenaar wrote: > > 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? 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. -- John Baldwin