diff options
author | Andi Kleen <ak@suse.de> | 2005-09-12 12:49:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-12 13:49:57 -0400 |
commit | 69e1a33f62eff9b228a8cc2c3e4429dbee8966c9 (patch) | |
tree | 985f088d05f2d936cfafa5dd0232aa59391dc663 /arch/i386/pci | |
parent | 413588c7cb8113c03d0044f1d41b832ad7201c29 (diff) |
[PATCH] x86-64: Use ACPI PXM to parse PCI<->node assignments
Since this is shared code I had to implement it for i386 too
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/pci')
-rw-r--r-- | arch/i386/pci/acpi.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/i386/pci/acpi.c b/arch/i386/pci/acpi.c index 42913f43feb0..2941674f35eb 100644 --- a/arch/i386/pci/acpi.c +++ b/arch/i386/pci/acpi.c | |||
@@ -3,16 +3,31 @@ | |||
3 | #include <linux/init.h> | 3 | #include <linux/init.h> |
4 | #include <linux/irq.h> | 4 | #include <linux/irq.h> |
5 | #include <asm/hw_irq.h> | 5 | #include <asm/hw_irq.h> |
6 | #include <asm/numa.h> | ||
6 | #include "pci.h" | 7 | #include "pci.h" |
7 | 8 | ||
8 | struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int domain, int busnum) | 9 | struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int domain, int busnum) |
9 | { | 10 | { |
11 | struct pci_bus *bus; | ||
12 | |||
10 | if (domain != 0) { | 13 | if (domain != 0) { |
11 | printk(KERN_WARNING "PCI: Multiple domains not supported\n"); | 14 | printk(KERN_WARNING "PCI: Multiple domains not supported\n"); |
12 | return NULL; | 15 | return NULL; |
13 | } | 16 | } |
14 | 17 | ||
15 | return pcibios_scan_root(busnum); | 18 | bus = pcibios_scan_root(busnum); |
19 | #ifdef CONFIG_ACPI_NUMA | ||
20 | if (bus != NULL) { | ||
21 | int pxm = acpi_get_pxm(device->handle); | ||
22 | if (pxm >= 0) { | ||
23 | bus->sysdata = (void *)(unsigned long)pxm_to_node(pxm); | ||
24 | printk("bus %d -> pxm %d -> node %ld\n", | ||
25 | busnum, pxm, (long)(bus->sysdata)); | ||
26 | } | ||
27 | } | ||
28 | #endif | ||
29 | |||
30 | return bus; | ||
16 | } | 31 | } |
17 | 32 | ||
18 | extern int pci_routeirq; | 33 | extern int pci_routeirq; |