/*
* The PCI controller list.
*/
-
-static struct pci_controller *hose_head, **hose_tail = &hose_head;
+static LIST_HEAD(controllers);
unsigned long PCIBIOS_MIN_IO;
unsigned long PCIBIOS_MIN_MEM;
&resources);
hose->bus = bus;
- need_domain_info = need_domain_info || hose->index;
- hose->need_domain_info = need_domain_info;
+ need_domain_info = need_domain_info || pci_domain_nr(bus);
+ set_pci_need_domain_info(hose, need_domain_info);
if (!bus) {
pci_free_resource_list(&resources);
goto out;
}
- *hose_tail = hose;
- hose_tail = &hose->next;
+ INIT_LIST_HEAD(&hose->list);
+ list_add(&hose->list, &controllers);
/*
* Do not panic here but later - this might happen before console init.
"Skipping PCI bus scan due to resource conflict\n");
}
-static void __init pcibios_set_cache_line_size(void)
+static int __init pcibios_set_cache_line_size(void)
{
struct cpuinfo_mips *c = ¤t_cpu_data;
unsigned int lsize;
pci_dfl_cache_line_size = lsize >> 2;
pr_debug("PCI: pci_cache_line_size set to %d bytes\n", lsize);
+ return 0;
}
+arch_initcall(pcibios_set_cache_line_size);
static int __init pcibios_init(void)
{
struct pci_controller *hose;
- pcibios_set_cache_line_size();
-
/* Scan all of the recorded PCI controllers. */
- for (hose = hose_head; hose; hose = hose->next)
+ list_for_each_entry(hose, &controllers, list)
pcibios_scanbus(hose);
pci_fixup_irqs(pci_common_swizzle, pcibios_map_irq);