Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2001 19:23:29 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Brian Somers <brian@Awfulhak.org>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, Garrett Wollman <wollman@khavrinen.lcs.mit.edu>, freebsd-arch@FreeBSD.ORG
Subject:   Re: RFC: unit_list routines 
Message-ID:  <20010523022329.ADF97380A@overcee.netplex.com.au>
In-Reply-To: <200105230038.f4N0cAb12470@hak.lan.Awfulhak.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010523022329.ADF97380A>