From owner-freebsd-arch@FreeBSD.ORG Sun Oct 16 03:45:41 2011 Return-Path: Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 761201065670; Sun, 16 Oct 2011 03:45:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 06D718FC12; Sun, 16 Oct 2011 03:45:34 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p9G3jRXd068490 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sat, 15 Oct 2011 21:45:29 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Sat, 15 Oct 2011 21:45:23 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <4EEA1F8B-9854-4C5C-A397-95AD454D3680@bsdimp.com> References: To: Adrian Chadd X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sat, 15 Oct 2011 21:45:29 -0600 (MDT) Cc: freebsd-arch@FreeBSD.ORG Subject: Re: newbus bus access routines and bus_space_barrier() X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 03:45:41 -0000 Usually they are needed, but we get away without them often because they = are needed in a limited set of circumstances and we have memory barriers = in our locking primitives. Warner On Oct 15, 2011, at 7:48 PM, Adrian Chadd wrote: > Hi all, >=20 > I'm not clued up on the way of the bus API, so please excuse the > newbie questions. >=20 > Nathan and I found that ath(4) wasn't working for a user because of a > missing bus barrier. Ath trips it up because it does lots of loops of > register reads/writes through the bus stream API rather than the > normal bus API. > It does this because it handles the register value swapping in > hardware rather than in software. >=20 > The correct fix is to teach ath(4) to use bus_space_barrier() calls > when doing stream calls, which I can do, but the newbus documentation > points out that both normal and stream bus access doesn't enforce > ordering, and barrier calls are needed. But I don't see lots of > bus_space_barrier() calls everywhere. Why's that? >=20 > Thanks, >=20 >=20 > Adrian > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to = "freebsd-arch-unsubscribe@freebsd.org" >=20 >=20