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

From: Jesse Barnes
Date: Thu Jul 29 2004 - 11:04:42 EST


On Wednesday, July 28, 2004 5:06 pm, Matthew Dobson wrote:
> Ok, so I'm no longer convinced that this will work as well as I once
> 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,

Yeah, that sounds reasonable. You could protect a generic definition with
#ifndef ARCH_HAS_PCIBUS_TO_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
> overload that to return NODE_MASK_ALL for non-NUMA systems, and have it
> do the right thing for arches that care...

Yeah, I think that would work. The alternative is to simply add the field,
initialize it in pci_alloc_bus like you're doing, and leave it to the arches
to fill it in however they see fit.

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