Re: RFC: PCI hotplug resource reservation

From: Scott Murray (
Date: Wed Aug 07 2002 - 08:44:30 EST

On Wed, 7 Aug 2002, David Woodhouse wrote:

> said:
> > However, in my quest to avoid duplicating the piles of resource
> > manipulation code in the Compaq and IBM hotplug drivers, and use the
> > PCI API in the fashion of the Cardbus driver, I've had to implement an
> > idea mentioned to me by David Woodhouse at OLS, namely boot-time PCI
> > resource reservation.
> ISTR I referred to that as an evil hack.

I agree that it's a hack, but after digging around in the PCI code over
the last month and a half it has grown on me. :)

> Is there any particular reason why you can't assign random bits of address
> space to cards and simply fix up the bridges accordingly so that
> transactions for that range are forwarded?

Yes, that idea doesn't work all the time. If you let pci_assign_resource
allocate from the root of the resource tree, you will get all the resources
you want no problem. However, it's entirely possible that you will be
allocated resource ranges that are intermingled with the ranges that are
behind other bridges or devices. There's no sane way to program the
hotplug bridge's BARs in such a situation.

As I said above, I agree that the reservation scheme is hackish, but since
there's no clear way (to me at least) to rework the resource allocation
system to handle this problem, I feel its advantages outweigh its
disadvantages at the moment.


Scott Murray
SOMA Networks, Inc.
Toronto, Ontario

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:36 EST