diff options
author | Christoph Lameter <christoph@lameter.com> | 2005-06-23 03:08:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-23 12:45:08 -0400 |
commit | 8c5a09082f4e61a176382e96a831a0636b918602 (patch) | |
tree | 89a7086ebbec9d94dc7b7b3483d3750220ba979c /arch/x86_64/pci | |
parent | e164f5573bef0e6caf53519719cf0228c9c15ce3 (diff) |
[PATCH] x86/x86_64: pcibus_to_node
Define pcibus_to_node to be able to figure out which NUMA node contains a
given PCI device. This defines pcibus_to_node(bus) in
include/linux/topology.h and adjusts the macros for i386 and x86_64 that
already provided a way to determine the cpumask of a pci device.
x86_64 was changed to not build an array of cpumasks anymore. Instead an
array of nodes is build which can be used to generate the cpumask via
node_to_cpumask.
Signed-off-by: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/pci')
-rw-r--r-- | arch/x86_64/pci/k8-bus.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/arch/x86_64/pci/k8-bus.c b/arch/x86_64/pci/k8-bus.c index 62349c78db57..7e7d0c2a0025 100644 --- a/arch/x86_64/pci/k8-bus.c +++ b/arch/x86_64/pci/k8-bus.c | |||
@@ -53,25 +53,11 @@ fill_mp_bus_to_cpumask(void) | |||
53 | for (j = SECONDARY_LDT_BUS_NUMBER(ldtbus); | 53 | for (j = SECONDARY_LDT_BUS_NUMBER(ldtbus); |
54 | j <= SUBORDINATE_LDT_BUS_NUMBER(ldtbus); | 54 | j <= SUBORDINATE_LDT_BUS_NUMBER(ldtbus); |
55 | j++) | 55 | j++) |
56 | pci_bus_to_cpumask[j] = | 56 | pci_bus_to_node[j] = NODE_ID(nid); |
57 | node_to_cpumask(NODE_ID(nid)); | ||
58 | } | 57 | } |
59 | } | 58 | } |
60 | } | 59 | } |
61 | 60 | ||
62 | /* quick sanity check */ | ||
63 | printed = 0; | ||
64 | for (i = 0; i < 256; i++) { | ||
65 | if (cpus_empty(pci_bus_to_cpumask[i])) { | ||
66 | pci_bus_to_cpumask[i] = CPU_MASK_ALL; | ||
67 | if (printed) | ||
68 | continue; | ||
69 | printk(KERN_ERR | ||
70 | "k8-bus.c: some busses have empty cpu mask\n"); | ||
71 | printed = 1; | ||
72 | } | ||
73 | } | ||
74 | |||
75 | return 0; | 61 | return 0; |
76 | } | 62 | } |
77 | 63 | ||