From: Andrew Morton It's bust. Cc: Greg KH Signed-off-by: Andrew Morton --- arch/i386/pci/acpi.c | 20 ++------------------ include/asm-i386/pci.h | 14 -------------- include/asm-x86_64/pci.h | 14 -------------- 3 files changed, 2 insertions(+), 46 deletions(-) diff -puN arch/i386/pci/acpi.c~revert-gregkh-pci-x86-pci-domain-support-the-meat arch/i386/pci/acpi.c --- devel/arch/i386/pci/acpi.c~revert-gregkh-pci-x86-pci-domain-support-the-meat 2006-01-14 23:05:53.000000000 -0800 +++ devel-akpm/arch/i386/pci/acpi.c 2006-01-14 23:05:53.000000000 -0800 @@ -8,34 +8,18 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int domain, int busnum) { struct pci_bus *bus; - struct pci_sysdata *sd; - /* Allocate per-root-bus (not per bus) arch-specific data. - * TODO: leak; this memory is never freed. - * It's arguable whether it's worth the trouble to care. - */ - sd = kzalloc(sizeof(*sd), GFP_KERNEL); - if (!sd) { - printk(KERN_ERR "PCI: OOM, not probing PCI bus %02x\n", busnum); - return NULL; - } - -#ifdef CONFIG_PCI_DOMAINS - sd->domain = domain; -#else if (domain != 0) { printk(KERN_WARNING "PCI: Multiple domains not supported\n"); return NULL; } -#endif /* CONFIG_PCI_DOMAINS */ - bus = pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd); - if (!bus) - kfree(sd); + bus = pcibios_scan_root(busnum); #ifdef CONFIG_ACPI_NUMA if (bus != NULL) { int pxm = acpi_get_pxm(device->handle); if (pxm >= 0) { + struct pci_sysdata *sd = bus->sysdata; sd->node = pxm_to_node(pxm); printk("bus %d -> pxm %d -> node %d\n", busnum, pxm, sd->node); diff -puN include/asm-i386/pci.h~revert-gregkh-pci-x86-pci-domain-support-the-meat include/asm-i386/pci.h --- devel/include/asm-i386/pci.h~revert-gregkh-pci-x86-pci-domain-support-the-meat 2006-01-14 23:05:53.000000000 -0800 +++ devel-akpm/include/asm-i386/pci.h 2006-01-14 23:05:53.000000000 -0800 @@ -6,23 +6,9 @@ #ifdef __KERNEL__ struct pci_sysdata { - int domain; /* PCI domain */ int node; /* NUMA node */ }; -#ifdef CONFIG_PCI_DOMAINS -static inline int pci_domain_nr(struct pci_bus *bus) -{ - struct pci_sysdata *sd = bus->sysdata; - return sd->domain; -} - -static inline int pci_proc_domain(struct pci_bus *bus) -{ - return pci_domain_nr(bus); -} -#endif /* CONFIG_PCI_DOMAINS */ - #include /* for struct page */ /* Can be used to override the logic in pci_scan_bus for skipping diff -puN include/asm-x86_64/pci.h~revert-gregkh-pci-x86-pci-domain-support-the-meat include/asm-x86_64/pci.h --- devel/include/asm-x86_64/pci.h~revert-gregkh-pci-x86-pci-domain-support-the-meat 2006-01-14 23:05:53.000000000 -0800 +++ devel-akpm/include/asm-x86_64/pci.h 2006-01-14 23:05:53.000000000 -0800 @@ -7,23 +7,9 @@ #ifdef __KERNEL__ struct pci_sysdata { - int domain; /* PCI domain */ int node; /* NUMA node */ }; -#ifdef CONFIG_PCI_DOMAINS -static inline int pci_domain_nr(struct pci_bus *bus) -{ - struct pci_sysdata *sd = bus->sysdata; - return sd->domain; -} - -static inline int pci_proc_domain(struct pci_bus *bus) -{ - return pci_domain_nr(bus); -} -#endif /* CONFIG_PCI_DOMAINS */ - #include /* for struct page */ /* Can be used to override the logic in pci_scan_bus for skipping _