From owner-freebsd-arch Tue May 22 17:38:16 2001 Delivered-To: freebsd-arch@freebsd.org Received: from Awfulhak.org (awfulhak.demon.co.uk [194.222.196.252]) by hub.freebsd.org (Postfix) with ESMTP id 1893037B422 for ; Tue, 22 May 2001 17:38:13 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.3/8.11.3) with ESMTP id f4N0cBY05551; Wed, 23 May 2001 01:38:11 +0100 (BST) (envelope-from brian@lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.3/8.11.3) with ESMTP id f4N0cAb12470; Wed, 23 May 2001 01:38:10 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200105230038.f4N0cAb12470@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Poul-Henning Kamp , Garrett Wollman Cc: Brian Somers , freebsd-arch@FreeBSD.ORG, brian@Awfulhak.org Subject: Re: RFC: unit_list routines In-Reply-To: Message from Poul-Henning Kamp of "Tue, 22 May 2001 21:15:53 +0200." <72211.990558953@critter> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 23 May 2001 01:38:09 +0100 From: Brian Somers 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 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 ? 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. 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 ? -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message