From owner-freebsd-arm@FreeBSD.ORG Sun Feb 21 23:54:06 2010 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 D42BF106568D; Sun, 21 Feb 2010 23:54:05 +0000 (UTC) (envelope-from doginou@kanar.ci0.org) Received: from kanar.ci0.org (unknown [IPv6:2a01:e0b:1:50:40:63ff:feea:93a]) by mx1.freebsd.org (Postfix) with ESMTP id 726B28FC1A; Sun, 21 Feb 2010 23:54:04 +0000 (UTC) Received: from kanar.ci0.org (pluxor@localhost [127.0.0.1]) by kanar.ci0.org (8.14.2/8.14.3) with ESMTP id o1LNs8gP065353; Mon, 22 Feb 2010 00:54:08 +0100 (CET) (envelope-from doginou@kanar.ci0.org) Received: (from doginou@localhost) by kanar.ci0.org (8.14.2/8.14.3/Submit) id o1LNs8cP065352; Mon, 22 Feb 2010 00:54:08 +0100 (CET) (envelope-from doginou) Date: Mon, 22 Feb 2010 00:54:08 +0100 From: Olivier Houchard To: "M. Warner Losh" Message-ID: <20100221235408.GA65302@ci0.org> References: <20100221152824.GA58060@ci0.org> <4B819F21.70907@FreeBSD.org> <20100221.152518.366306193186912981.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100221.152518.366306193186912981.imp@bsdimp.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-arm@FreeBSD.org, dougb@FreeBSD.org Subject: Re: bind on arm 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: Sun, 21 Feb 2010 23:54:06 -0000 On Sun, Feb 21, 2010 at 03:25:18PM -0700, M. Warner Losh wrote: > In message: <4B819F21.70907@FreeBSD.org> > Doug Barton writes: > : On 02/21/10 07:28, Olivier Houchard wrote: > : > Hi Doug, > : > > : > I'd like to get the attached patch committed. It fixes the bind arm atomic > : > stuff in -CURRENT and RELENG_8. Some times ago, the RAS address was changed, > : > but it was hardcoded in the bind code and the change was never reflected. > : > The patch uses a macro, so that even if it happens again it won't be a problem. > : > : First question (and I think the answer is yes, but I need to > : double-check) is it the consensus of the ARM gurus that this is the > : right solution? Second question, is this solution something that I can > : send upstream, both in the sense that I have permission to do so, and > : that it would be generally applicable to ARM on other OSs? > > The fanciest way to cope would be to have a run-time check to see > which address to use. This likely isn't worth the bother since the > user base is still relatively small (and none of the other atomics do > this). The next best approach would be to include > and use the value defined there for ARM_RAS_START and ARM_RAS_END. > Again, I've not double checked to make sure they are defined before, > but I think they are (or at least if they aren't defined, we know to > use the old value). > Actually, the patch I sent Doug does just that, it uses ARM_RAS_START (because it includes machine/atomic.h, which includes machine/sysarch.h). It should work for 7 as well, as ARM_RAS_START was defined too (but in machine/atomic.h) Regards, Olivier