x86/PCI: set_pci_bus_resources_arch_default cleanups
authorYinghai Lu <yinghai@kernel.org>
Sat, 18 Apr 2009 17:11:25 +0000 (10:11 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 22 Apr 2009 21:47:46 +0000 (14:47 -0700)
Rename set_pci_bus_resources_arch_default to x86_pci_root_bus_res_quirks, move
the weak version from common.c to i386.c, and before calling, make sure it's a
root bus.

Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
arch/x86/include/asm/topology.h
arch/x86/pci/amd_bus.c
arch/x86/pci/common.c
arch/x86/pci/i386.c

index 892b119dba6ff8c64c99c8c3432e812de860ef98..f44b49abca49b93c1f9386f65e0b2b5df118a354 100644 (file)
@@ -200,7 +200,7 @@ static inline void arch_fix_phys_package_id(int num, u32 slot)
 }
 
 struct pci_bus;
-void set_pci_bus_resources_arch_default(struct pci_bus *b);
+void x86_pci_root_bus_res_quirks(struct pci_bus *b);
 
 #ifdef CONFIG_SMP
 #define mc_capable()   (cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids)
index 9bb09823b3622410542753309cd3f546e207f923..e121ee050f7cd68aef17fdd5ba2a189ea082dcf1 100644 (file)
@@ -94,7 +94,7 @@ struct pci_root_info {
 static int pci_root_num;
 static struct pci_root_info pci_root_info[PCI_ROOT_NR];
 
-void set_pci_bus_resources_arch_default(struct pci_bus *b)
+void x86_pci_root_bus_res_quirks(struct pci_bus *b)
 {
        int i;
        int j;
index f80ece51305d600142b3deb4faab75c5a6cd37a7..2202b6257b82b84bb9ef17f33630ca7dac929610 100644 (file)
@@ -142,10 +142,6 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
        }
 }
 
-void __attribute__((weak)) set_pci_bus_resources_arch_default(struct pci_bus *b)
-{
-}
-
 /*
  *  Called after each bus is probed, but before its children
  *  are examined.
@@ -155,7 +151,9 @@ void __devinit pcibios_fixup_bus(struct pci_bus *b)
 {
        struct pci_dev *dev;
 
-       set_pci_bus_resources_arch_default(b);
+       /* root bus? */
+       if (!b->parent)
+               x86_pci_root_bus_res_quirks(b);
        pci_read_bridge_bases(b);
        list_for_each_entry(dev, &b->devices, bus_list)
                pcibios_fixup_device_resources(dev);
index f1817f71e009a274bab8b4ed4fe9f0a3baadd75e..a85bef20a3b97f32e74ee08f246555c55ac6679a 100644 (file)
@@ -238,6 +238,10 @@ void __init pcibios_resource_survey(void)
  */
 fs_initcall(pcibios_assign_resources);
 
+void __weak x86_pci_root_bus_res_quirks(struct pci_bus *b)
+{
+}
+
 /*
  *  If we set up a device for bus mastering, we need to check the latency
  *  timer as certain crappy BIOSes forget to set it properly.