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

From: Andi Kleen
Date: Tue Jul 27 2004 - 09:20:19 EST


On Mon, 26 Jul 2004 17:10:08 -0700
Matthew Dobson <colpatch@xxxxxxxxxx> 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.

Not sure that is a good idea. Sometimes this information is not available.
With pcibus_to_cpumask() the fallback is obvious, but it isn't with
pcibus_to_node(). Returning a random node is wrong.


> This is just a preliminary patch. It needs review for x86_64, as I
> don't know how to properly populate the mp_bus_to_node (which used to be
> mp_bus_to_cpumask) array.

It's impossible currently - I need an ACPI 3.0 BIOS to get this information.
Even then there will be machines who don't supply it.

I tried some time ago to get it from the hardware, but the hardware registers
were arcane enough that I didn't find it easy enough. Relying on firmware
for this thing is probably a better idea anyways.

-Andi

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