Re: [Lse-tech] [RFC][PATCH] Change pcibus_to_cpumask() to pcibus_to_node()

From: Rajesh Shah
Date: Thu Jul 29 2004 - 12:11:54 EST


On Wed, Jul 28, 2004 at 05:06:48PM -0700, Matthew Dobson wrote:
>
> thought. It's pretty trivial to add a nodemask_t to the struct pci_bus,
> and even initialize it to a reasonable value (ie: NODE_MASK_ALL) since
> there's the convenient pci_alloc_bus() function in drivers/pci/probe.c.
> The problem is where to put hooks for individual arches to put the
> *real* nodemask in this field... My only thought right now is to create
> a per-arch callback function, arch_get_pcibus_nodemask() or something,
> and use the value it returns to populate pci_bus->nodemask. We would
> have to call this function anywhere a struct pci_bus is allocated, and
> probably pass along the PCI bus number so the arch could determine which
> nodes it belongs to. Would that work for everyone that cares? We could

With PCI root/p2p bridge hotplug, the code dealing with the
hotplug (e.g. ACPI hotplug code) will have this information, not
arch specific code. How about having the PCI subsystem export
an interface to set the nodemask, and have the arch or hotplug
code call it to change the defaults? That way, pci_alloc_bus()
simply sets the default and does not perform any callback.
Does that work for everyone?

Rajesh

-
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/