diff options
author | Muli Ben-Yehuda <muli@il.ibm.com> | 2007-08-10 16:01:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-11 18:47:42 -0400 |
commit | 73c59afc65cfa50c3362b9ce1ec151a79c41dd8e (patch) | |
tree | aef70231e894fcbd28d94a29e306c2856dbc9e3a /arch/i386/pci/numa.c | |
parent | f0b85c0cfdad8977d82fed88e846fc2245585d0e (diff) |
finish i386 and x86-64 sysdata conversion
This patch finishes the i386 and x86-64 ->sysdata conversion and hopefully
also fixes Riku's and Andy's observed bugs. It is based on Yinghai Lu's
and Andy Whitcroft's patches (thanks!) with some changes:
- introduce pci_scan_bus_with_sysdata() and use it instead of
pci_scan_bus() where appropriate. pci_scan_bus_with_sysdata() will
allocate the sysdata structure and then call pci_scan_bus().
- always allocate pci_sysdata dynamically. The whole point of this
sysdata work is to make it easy to do root-bus specific things
(e.g., support PCI domains and IOMMU's). I dislike using a default
struct pci_sysdata in some places and a dynamically allocated
pci_sysdata elsewhere - the potential for someone indavertantly
changing the default structure is too high.
- this patch only makes the minimal changes necessary, i.e., the NUMA node is
always initialized to -1. Patches to do the right thing with regards
to the NUMA node can build on top of this (either add a 'node'
parameter to pci_scan_bus_with_sysdata() or just update the node
when it becomes known).
The patch was compile tested with various configurations (e.g., NUMAQ,
VISWS) and run-time tested on i386 and x86-64. Unfortunately none of my
machines exhibited the bugs so caveat emptor.
Andy, could you please see if this fixes the NUMA issues you've seen?
Riku, does this fix "pci=noacpi" on your laptop?
Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: <riku.seppala@kymp.net>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386/pci/numa.c')
-rw-r--r-- | arch/i386/pci/numa.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/i386/pci/numa.c b/arch/i386/pci/numa.c index adbe17a38f6f..f5f165f69e0c 100644 --- a/arch/i386/pci/numa.c +++ b/arch/i386/pci/numa.c | |||
@@ -96,10 +96,14 @@ static void __devinit pci_fixup_i450nx(struct pci_dev *d) | |||
96 | pci_read_config_byte(d, reg++, &suba); | 96 | pci_read_config_byte(d, reg++, &suba); |
97 | pci_read_config_byte(d, reg++, &subb); | 97 | pci_read_config_byte(d, reg++, &subb); |
98 | DBG("i450NX PXB %d: %02x/%02x/%02x\n", pxb, busno, suba, subb); | 98 | DBG("i450NX PXB %d: %02x/%02x/%02x\n", pxb, busno, suba, subb); |
99 | if (busno) | 99 | if (busno) { |
100 | pci_scan_bus(QUADLOCAL2BUS(quad,busno), &pci_root_ops, NULL); /* Bus A */ | 100 | /* Bus A */ |
101 | if (suba < subb) | 101 | pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, busno)); |
102 | pci_scan_bus(QUADLOCAL2BUS(quad,suba+1), &pci_root_ops, NULL); /* Bus B */ | 102 | } |
103 | if (suba < subb) { | ||
104 | /* Bus B */ | ||
105 | pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, suba+1)); | ||
106 | } | ||
103 | } | 107 | } |
104 | pcibios_last_bus = -1; | 108 | pcibios_last_bus = -1; |
105 | } | 109 | } |
@@ -123,8 +127,7 @@ static int __init pci_numa_init(void) | |||
123 | continue; | 127 | continue; |
124 | printk("Scanning PCI bus %d for quad %d\n", | 128 | printk("Scanning PCI bus %d for quad %d\n", |
125 | QUADLOCAL2BUS(quad,0), quad); | 129 | QUADLOCAL2BUS(quad,0), quad); |
126 | pci_scan_bus(QUADLOCAL2BUS(quad,0), | 130 | pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, 0)); |
127 | &pci_root_ops, NULL); | ||
128 | } | 131 | } |
129 | return 0; | 132 | return 0; |
130 | } | 133 | } |