Re: [PATCH 1/1] PCI: allocate essential resources before reserving hotplug resources

From: Bjorn Helgaas
Date: Tue Jan 18 2011 - 17:12:05 EST


On Tuesday, January 18, 2011 02:42:53 pm Ram Pai wrote:
> On Tue, Jan 18, 2011 at 01:52:06PM -0700, Bjorn Helgaas wrote:

> > This is a PCI-specific issue, so I'm not comfortable adding add_size
> > to struct resource. That penalizes all resource users while only
> > helping PCI. Also, the struct resource lives forever, and the
> > add_size information is only useful while we're configuring the
> > bridge.
>
> Any suggestion on how to do this without adding a field to struct resource?

It *is* a little ugly. You compute some of this info early, in
pbus_size_io/mem(), but it's not used until later. Maybe it would
make sense in struct pci_bus? That's a pain, too, because then you
have to test the resource type in adjust_resources_sorted() but at
least it's a per-PCI bridge structure.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/