From owner-freebsd-acpi@FreeBSD.ORG Thu Jun 3 13:55:07 2004 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76CB916A4CE; Thu, 3 Jun 2004 13:55:07 -0700 (PDT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1698F43D39; Thu, 3 Jun 2004 13:55:07 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i53KqQRs049848; Thu, 3 Jun 2004 14:52:26 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 03 Jun 2004 14:52:30 -0600 (MDT) Message-Id: <20040603.145230.13772293.imp@bsdimp.com> To: nate@root.org From: "M. Warner Losh" In-Reply-To: <20040603133254.N44646@root.org> References: <20040603104616.I43856@root.org> <20040603.121143.08320551.imp@bsdimp.com> <20040603133254.N44646@root.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-acpi@FreeBSD.ORG cc: jhb@FreeBSD.ORG Subject: Re: Patch: Defer bus_config_intr() until bus_alloc_resource().. X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2004 20:55:07 -0000 In message: <20040603133254.N44646@root.org> Nate Lawson writes: : On Thu, 3 Jun 2004, M. Warner Losh wrote: : > In message: <20040603104616.I43856@root.org> : > Nate Lawson writes: : > : With hotplug, we're going to need ways for a separate routine to set : > : resource attributes before bus_alloc_resource() time. Plus, you yourself : > : are an advocate of a multi-pass probing approach that includes separating : > : resource reservation from allocation. : > : > I don't understand this comment at all. We already support two : > different hot-plug technologies that allocate resources out of memory, : > i/o and irq space. This is done by the bus that knows what resources : > the child needs before adding the child to the bus. : : I don't have an example handy, but there are tables (SSDT) that can : appear/disappear with device insertion and it would be helpful to be able : to set up any resources described by them before device_attach() and alloc : time. I'm interested why bus_{get,set}_resource even exist if our plan : all along was to defer all resource parsing to alloc time. We already do that for pccard and cardbus. We parse the CIS or frob the BARs and allocate resources as appropriate. Hot swap pci bridges could do logically identical things when it detects a new device has appeared. Since there has to be some agent that adds the children, that agent also is responsible for dealing with the resources that the new, shiny device requires. Warner