From owner-freebsd-mips@FreeBSD.ORG Mon Aug 27 06:07:05 2012 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D29CD106566C; Mon, 27 Aug 2012 06:07:05 +0000 (UTC) (envelope-from hans.petter.selasky@bitfrost.no) Received: from smtp02-out.isp.tdc.no (smtp02-out.isp.tdc.no [213.236.144.173]) by mx1.freebsd.org (Postfix) with ESMTP id 5C13D8FC0C; Mon, 27 Aug 2012 06:07:05 +0000 (UTC) Received: from mail.bitfrost.no (mail.bitfrost.no [85.19.79.136]) by smtp02-out.isp.tdc.no (Postfix) with ESMTP id 3X52cd1p2pz3CP; Mon, 27 Aug 2012 08:04:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bitfrost.no From: =?windows-1252?Q?Hans_Petter_Selasky?= To: =?windows-1252?Q?Ian_Lepore?= , =?windows-1252?Q?Warner_Losh?= Date: Mon, 27 Aug 2012 08:06:57 +0200 Mime-Version: 1.0 In-Reply-To: <6D83AF9D-577B-4C83-84B7-C4E3B32695FC@bsdimp.com> References: <6D83AF9D-577B-4C83-84B7-C4E3B32695FC@bsdimp.com> X-Priority: 3 (Normal) Message-Id: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "=?windows-1252?Q?freebsd-arm=40freebsd.org?=" , "=?windows-1252?Q?freebsd-mips=40freebsd.org?=" , "=?windows-1252?Q?freebsd-arch=40freebsd.org?=" Subject: RE: Partial cacheline flush problems on ARM and MIPS X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 06:07:06 -0000 Hi,=20=0D=0ACorrect.=0D=0A=0D=0A> We also need some rules about working w= ith buffers obtained from=0D=0A> bus_dmamem_alloc() and external buffers = passed to bus_dmamap_load(). =A0I=0D=0A> think the rule should be that a = buffer obtained from bus_dmamem_alloc(),=0D=0A> or more formally any regi= on of memory mapped by a bus_dmamap_load(), is=0D=0A> a single logical ob= ject which can only be accessed by one entity at a=0D=0A> time. =A0That m= eans that there cannot be two concurrent DMA operations=0D=0A> happening = in different regions of the same buffer, nor can DMA and CPU=0D=0A> acces= s be happening concurrently even if in different parts of the=0D=0A> buff= er. =A0=0D=0A=0D=0A=0D=0AIs this something which we can fix using a simpl= e __align(USB_DMA_ALIGN) on elements in C-structures which are allowed to= be DMA loaded.=0D=0A=0D=0A=A0=0D=0A=0D=0AAlso: Why is busdma not complai= ning when loading a non-valid buffer pointer=3F=0D=0A=0D=0A--HPS=0D=0A