From owner-freebsd-arch Tue May 22 19:23:32 2001 Delivered-To: freebsd-arch@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [65.0.135.147]) by hub.freebsd.org (Postfix) with ESMTP id 0396837B422 for ; Tue, 22 May 2001 19:23:30 -0700 (PDT) (envelope-from peter@wemm.org) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f4N2NTM85186 for ; Tue, 22 May 2001 19:23:29 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id ADF97380A; Tue, 22 May 2001 19:23:29 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Brian Somers Cc: Poul-Henning Kamp , Garrett Wollman , freebsd-arch@FreeBSD.ORG Subject: Re: RFC: unit_list routines In-Reply-To: <200105230038.f4N0cAb12470@hak.lan.Awfulhak.org> Date: Tue, 22 May 2001 19:23:29 -0700 From: Peter Wemm Message-Id: <20010523022329.ADF97380A@overcee.netplex.com.au> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Brian Somers wrote: > phk said: > > Hi Brian, > > > > Couldn't the resource manager used for interrupts and similar > > do this as well ? > > wollman said: > > The resource manager code was designed to do precisely that, and > > already exists. It may have gotten too entwined with the bus stuff, > > though, but it was certainly my intent that you should be able to use > > it for this purpose. > > There doesn't seem to be anything at all suitable there. I assume > you (pl.) are referring to the struct resource_list stuff declared in > bus.h ? No, kern/subr_rman.c, sys/rman.h. struct resource_list is bus stuff, not rman stuff. > The unit_list is an ordered list of ranges where the count is > implicit and a resource id or type field have no meaning. The idea > is to be able to allocate and release unit numbers relatively > frequently without obfuscating things with redundant information or > including odd things such bus hierarchies and unit counts. That is exactly what the rman stuff is for. > I can't see any way of deriving the two from any common set of > routines either - the resource_list stuff needs a hierarchy by it's > nature, and I guess the ``count'' bits are intended (eventually) for > handling limited resources such as power - not really applicable to > unit allocation. > > Maybe I'm missing something though ? Yes, you're looking at the wrong thing. :-) Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message