Patch: Defer bus_config_intr() until bus_alloc_resource()..

M. Warner Losh imp at bsdimp.com
Thu Jun 3 13:55:07 PDT 2004


In message: <20040603133254.N44646 at root.org>
            Nate Lawson <nate at root.org> writes:
: On Thu, 3 Jun 2004, M. Warner Losh wrote:
: > In message: <20040603104616.I43856 at root.org>
: >             Nate Lawson <nate at root.org> 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



More information about the freebsd-acpi mailing list