Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Aug 2012 08:06:57 +0200
From:      =?windows-1252?Q?Hans_Petter_Selasky?= <hans.petter.selasky@bitfrost.no>
To:        =?windows-1252?Q?Ian_Lepore?= <freebsd@damnhippie.dyndns.org>,  =?windows-1252?Q?Warner_Losh?= <imp@bsdimp.com>
Cc:        "=?windows-1252?Q?freebsd-arm=40freebsd.org?=" <freebsd-arm@freebsd.org>, "=?windows-1252?Q?freebsd-mips=40freebsd.org?=" <freebsd-mips@freebsd.org>, "=?windows-1252?Q?freebsd-arch=40freebsd.org?=" <freebsd-arch@freebsd.org>
Subject:   RE: Partial cacheline flush problems on ARM and MIPS
Message-ID:  <zarafa.503b0e81.5c36.1a2f71091ebf9bd2@eric2.bitfrost>
In-Reply-To: <6D83AF9D-577B-4C83-84B7-C4E3B32695FC@bsdimp.com>
References:  <6D83AF9D-577B-4C83-84B7-C4E3B32695FC@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi, 

Correct.



> We also need some rules about working with buffers obtained from

> bus_dmamem_alloc() and external buffers passed to bus_dmamap_load().  I

> think the rule should be that a buffer obtained from bus_dmamem_alloc(),

> or more formally any region of memory mapped by a bus_dmamap_load(), is

> a single logical object which can only be accessed by one entity at a

> time.  That means that there cannot be two concurrent DMA operations

> happening in different regions of the same buffer, nor can DMA and CPU

> access be happening concurrently even if in different parts of the

> buffer.  





Is this something which we can fix using a simple __align(USB_DMA_ALIGN) on elements in C-structures which are allowed to be DMA loaded.



 



Also: Why is busdma not complaining when loading a non-valid buffer pointer?



--HPS





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?zarafa.503b0e81.5c36.1a2f71091ebf9bd2>