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

From: Jesse Barnes
Date: Mon Jul 26 2004 - 22:43:38 EST


On Monday, July 26, 2004 8:10 pm, Matthew Dobson wrote:
> So in discussions with Jesse at OLS, we decided that pcibus_to_node() is
> a more generally useful function than pcibus_to_cpumask(). If anyone
> disagrees with that, now would be a good time to let us know.

Thanks for putting the fact that I was an idiot so kindly... :)

> 1) Replace instances of pcibus_to_cpumask(bus) with
> node_to_cpumask(pcibus_to_node(bus)). There are currently only 2 uses
> of pcibus_to_cpumask(): flush_gart() in arch/x86_64/kernel/pci-gart.c
> and pci_bus_show_cpuaffinity() in drivers/pci/probe.c.
> 2) Define the asm-generic version of pcibus_to_node() to always return
> node 0, as this is the sensible non-NUMA behavior.
> 3) Drop the mips/mach-ip27 and ppc64 versions of pcibus_to_cpumask()
> entirely, since they were simply defined to be identical to the
> asm-generic version.
> 4) Define the i386 version of pcibus_to_node().

Looks good to me.

> Future work:
>
> 1) Correctly map PCI buses to nodes for x86_64.
> 2) IA64 implementation?

I'll put this together, though the implementation will probably change as we
add PROM support in the SLIT and SRAT tables for our host to PCI bridges.

Platforms that support it should probably also use pcibus_to_node in their
pci_alloc_consistent and dma_alloc_coherent APIs if possible.

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