From owner-freebsd-sparc64@FreeBSD.ORG Sun Dec 30 18:28:42 2012 Return-Path: Delivered-To: sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C5DCD08; Sun, 30 Dec 2012 18:28:42 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id 0E4258FC0A; Sun, 30 Dec 2012 18:28:41 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id qBUISebg076182; Sun, 30 Dec 2012 11:28:41 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id qBUISbWD084746; Sun, 30 Dec 2012 11:28:37 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: Call for testing and review, busdma changes From: Ian Lepore To: Scott Long In-Reply-To: <30DCC8A9-8E26-4500-AF33-2D81981B554F@yahoo.com> References: <1355077061.87661.320.camel@revolution.hippie.lan> <1355085250.87661.345.camel@revolution.hippie.lan> <1356381775.1129.181.camel@revolution.hippie.lan> <1356390225.1129.217.camel@revolution.hippie.lan> <2D98F70D-4031-4860-BABB-1F4663896234@yahoo.com> <1356891693.54953.31.camel@revolution.hippie.lan> <30DCC8A9-8E26-4500-AF33-2D81981B554F@yahoo.com> Content-Type: text/plain; charset="us-ascii" Date: Sun, 30 Dec 2012 11:28:37 -0700 Message-ID: <1356892117.54953.37.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sun, 30 Dec 2012 19:48:54 +0000 Cc: powerpc@freebsd.org, marcel@freebsd.org, mips@freebsd.org, "mav@freebsd.org Motin" , "attilio@FreeBSD.org Rao" , Jeff Roberson , sparc64@freebsd.org, arm@freebsd.org, kib@freebsd.org X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 18:28:42 -0000 On Sun, 2012-12-30 at 11:23 -0700, Scott Long wrote: > On Dec 30, 2012, at 11:21 AM, Ian Lepore wrote: > > > On Mon, 2012-12-24 at 22:13 -0500, Scott Long wrote: > >>>>> > >>>>> Still unresolved is what to do about the remaining cases -- attempts to > >>>>> do dma in arbitrary buffers not obtained from bus_dmamem_alloc() which > >>>>> are not aligned and padded appropriately. There was some discussion a > >>>>> while back, but no clear resolution. I decided not to get bogged down > >>>>> by that fact and to fix the mbuf and allocated-buffer situations that we > >>>>> know how to deal with for now. > >>>> > >> > >> Why would these allocations not be handled as normal dynamic buffers > >> would with bus_dmamap_load()? > >> > >> Scott > > > > That's my point -- for "normal dynamic buffers" (that is, they weren't > > obtained from bus_dmamem_alloc() and they aren't mbufs) which can have > > arbitrary alignment and padding in relation to cache line boundaries -- > > we don't handle them correctly now unless they're accidentally already > > aligned and sized to the right boundaries. What's unresolved is how to > > handle them correctly if they're not aligned/padded, that is, what to do > > about them that avoids needing a partial cacheline flush at sync time. > > > > Alignment is already handled. > > Scott > No it's not. -- Ian