Date: Mon, 09 Feb 2009 11:59:32 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: scottl@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 Message-ID: <20090209.115932.1098202471.imp@bsdimp.com> In-Reply-To: <49907B32.8080307@samsco.org> References: <2EA5FEEB-E676-4D1B-9700-399C783F4590@mac.com> <20090209.113053.65361811.imp@bsdimp.com> <49907B32.8080307@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <49907B32.8080307@samsco.org>
Scott Long <scottl@samsco.org> writes:
: M. Warner Losh wrote:
: > In message: <2EA5FEEB-E676-4D1B-9700-399C783F4590@mac.com>
: > Marcel Moolenaar <xcllnt@mac.com> 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.
arm also does bounce buffering, but not for memory address space reasons.
Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090209.115932.1098202471.imp>
