From owner-freebsd-arm@FreeBSD.ORG Thu Aug 23 23:51:13 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A646F1065670; Thu, 23 Aug 2012 23:51:13 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 213518FC0C; Thu, 23 Aug 2012 23:51:12 +0000 (UTC) Received: by vcbgb22 with SMTP id gb22so1903080vcb.13 for ; Thu, 23 Aug 2012 16:51:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=JWgh66ZmryhJI/TjUNJMyoMIjSInrwXjCxbw7sDO0VU=; b=PZ8SFjrKUcp9xmS4PNcgWu/uw++fdJfnc3+SvKpzXkSwwVr50wSmz1+tRNT8abbGCF pD7n+mrr2bczBzMck/r5HVeaw2iQ8PY7TsewLVaT9uCez0hpNTwRfgygw5lg2u021j8e tKVDRgLq5mT+G83tr6qqkuMhr/6vUHFB7u1J/UHCAzT9x0KG2xC0FQ6e8xQ4VFs1Csuu hOPedDLB1aqUk7V2gTZKwnf3EQBYy9AxHZAs74HzGQGvCAC1bTyCcC+mGobafrZ7nopb Bxn2nF3M/SvOpaARk+DrRgAK1iSBsAo0uDWyhvn85Jthb90lOKSMv8An6LsuB4wpCerT c5DA== Received: by 10.220.247.137 with SMTP id mc9mr2858779vcb.52.1345765872283; Thu, 23 Aug 2012 16:51:12 -0700 (PDT) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPS id s1sm4496996vdi.14.2012.08.23.16.51.10 (version=SSLv3 cipher=OTHER); Thu, 23 Aug 2012 16:51:11 -0700 (PDT) Date: Thu, 23 Aug 2012 19:51:02 -0400 From: Alexander Kabaev To: Warner Losh Message-ID: <20120823195102.2dcc1fcc@kan.dyndns.org> In-Reply-To: <3A08EB08-2BBF-4B0F-97F2-A3264754C4B7@bsdimp.com> References: <1345757300.27688.535.camel@revolution.hippie.lan> <3A08EB08-2BBF-4B0F-97F2-A3264754C4B7@bsdimp.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/xAKsUfCFhIS7lv_PazDak7K"; protocol="application/pgp-signature" Cc: freebsd-arm@freebsd.org, freebsd-mips@freebsd.org, freebsd-arch@freebsd.org Subject: Re: Partial cacheline flush problems on ARM and MIPS 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: Thu, 23 Aug 2012 23:51:13 -0000 --Sig_/xAKsUfCFhIS7lv_PazDak7K Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 23 Aug 2012 15:50:35 -0600 Warner Losh wrote: >=20 > On Aug 23, 2012, at 3:28 PM, Ian Lepore wrote: > > A recent innocuous change to the USB driver code caused intermittant > > errors in the umass(4) driver on ARM and MIPS platforms, and this >=20 > I think the proper solution is to segregate DMA and non-DMA parts of > structures so that you don't have both sharing a cache line. >=20 > I also wonder why we don't allocate the DMA memory for these > structures separately from the non-DMA parts. This would eliminate > the USB_CACHE_BYTES kludge (which is CPU dependent, not arch > dependent) and move the knowledge of this junk into busdma layer > where it belongs. From my understanding of the issue, this would > completely eliminate the problem forever! >=20 > Sharing a cacheline between something that is DMA aware and something > that is just begging for trouble. We're doing more work than we > need to to support this dubious feature and we'd be miles ahead if we > could not share at all. >=20 > Warner I agree with Warner that this should be addressed at busdma level. When asked for DMA buffer, it should contrain its start address size to the cache line boundary. USB is insane allocating DMA buffers inside of own transfer structure and that was stated on a more than one occasion already. Since USB code refused to budge, we came with a horrible USB_CACHE_BYTES hack as as _temporary_ workaround. --=20 Alexander Kabaev --Sig_/xAKsUfCFhIS7lv_PazDak7K Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iD8DBQFQNsHtQ6z1jMm+XZYRAqeaAJsE2dyZ0FISrcOVX3Je3YvLQ1MNZQCfcF+M bBDN5eQWXQgUWXM3/UOthNI= =mcBu -----END PGP SIGNATURE----- --Sig_/xAKsUfCFhIS7lv_PazDak7K--