From owner-freebsd-arm@FreeBSD.ORG Mon Jun 29 13:07:33 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10A45106566C; Mon, 29 Jun 2009 13:07:33 +0000 (UTC) (envelope-from kosmo@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id B728C8FC12; Mon, 29 Jun 2009 13:07:32 +0000 (UTC) (envelope-from kosmo@semihalf.com) Received: from [10.0.0.5] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id E59C0C3A96; Mon, 29 Jun 2009 15:06:12 +0200 (CEST) From: Piotr =?utf-8?q?Zi=C4=99cik?= Organization: Semihalf To: Hans Petter Selasky Date: Mon, 29 Jun 2009 15:07:31 +0200 User-Agent: PLD Linux KMail/1.9.10 References: <200906231035.43096.kosmo@semihalf.com> <200906291249.43983.kosmo@semihalf.com> <200906291337.43635.hselasky@c2i.net> In-Reply-To: <200906291337.43635.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200906291507.31594.kosmo@semihalf.com> Cc: freebsd-arm@freebsd.org, freebsd-usb@freebsd.org, thompsa@freebsd.org Subject: Re: CPU Cache and busdma usage in USB X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2009 13:07:33 -0000 Monday 29 June 2009 13:37:41 Hans Petter Selasky napisa=C5=82(a): > if (op & BUS_DMASYNC_POSTREAD) { > if (bpage->vaddr_nocache =3D=3D 0) { > cpu_dcache_inv_range(bpage->vaddr, > bpage->datacount); > cpu_l2cache_inv_range(bpage->vaddr, > bpage->datacount); > } > bcopy((void *)(bpage->vaddr_nocache !=3D 0 ? > bpage->vaddr_nocache : bpage->vaddr), > (void *)bpage->datavaddr, bpage->datacount); > dmat->bounce_zone->total_bounced++; > } > > Change: bpage->vaddr into (bpage->vaddr & ~arm_dcache_align_mask) > Change: bpage->datacount into (bpage->datacount + (bpage->vaddr & > arm_dcache_align_mask) + arm_dcache_align_mask - 1) & > ~arm_dcache_align_mask; I have checked above changes and I do not observe any changes is USB behaviour. Problem still exists. =2D-=20 Best Regards. Piotr Ziecik