/* By default, we don't re-assign bus numbers. We do this only on * some pmacs
*/ staticint pci_assign_all_buses;
/* This will remain NULL for now, until isa-bridge.c is made common * to both 32-bit and 64-bit.
*/ struct pci_dev *isa_bridge_pcidev;
EXPORT_SYMBOL_GPL(isa_bridge_pcidev);
staticvoid
fixup_cpc710_pci64(struct pci_dev* dev)
{ /* Hide the PCI64 BARs from the kernel as their content doesn't * fit well in the resource management
*/
dev->resource[0].start = dev->resource[0].end = 0;
dev->resource[0].flags = 0;
dev->resource[1].start = dev->resource[1].end = 0;
dev->resource[1].flags = 0;
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64);
#ifndef CONFIG_PPC_PCI_OF_BUS_MAP return 0; #else /* Ok, here we need some tweak. If we have already renumbered * all busses, we can't rely on the OF bus number any more. * the pci_to_OF_bus_map is not enough as several PCI busses * may match the same OF bus number.
*/ if (!pci_to_OF_bus_map) return 0;
#ifdef CONFIG_PPC_PCI_OF_BUS_MAP /* We create the "pci-OF-bus-map" property now so it appears in the * /proc device tree
*/ void __init
pci_create_OF_bus_map(void)
{ struct property* of_prop; struct device_node *dn;
#ifdef CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT /* * Enable PCI domains in /proc when PCI bus numbers are not unique * across all PCI domains to prevent conflicts. And keep PCI domain 0 * backward compatible in /proc for video cards.
*/
pci_add_flags(PCI_ENABLE_PROC_DOMAINS | PCI_COMPAT_DOMAIN_0); #endif
if (pci_has_flag(PCI_REASSIGN_ALL_BUS))
pci_assign_all_buses = 1;
/* Scan all of the recorded PCI controllers. */
list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { #ifndef CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT if (pci_assign_all_buses)
hose->first_busno = next_busno; #endif
hose->last_busno = 0xff;
pcibios_scan_phb(hose);
pci_bus_add_devices(hose->bus); #ifndef CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT if (pci_assign_all_buses || next_busno <= hose->last_busno)
next_busno = hose->last_busno + pcibios_assign_bus_offset; #endif
}
/* OpenFirmware based machines need a map of OF bus * numbers vs. kernel bus numbers since we may have to * remap them.
*/ if (pci_assign_all_buses)
pcibios_make_OF_bus_map(); #endif #endif
/* Call common code to handle resource allocation */
pcibios_resource_survey();
/* Call machine dependent fixup */ if (ppc_md.pcibios_fixup)
ppc_md.pcibios_fixup();
/* Call machine dependent post-init code */ if (ppc_md.pcibios_after_init)
ppc_md.pcibios_after_init();
list_for_each_entry_safe(hose, tmp, &hose_list, list_node) if (bus >= hose->first_busno && bus <= hose->last_busno) return hose; return NULL;
}
/* Provide information on locations of various I/O regions in physical * memory. Do this on a per-card basis so that we choose the right * root bridge. * Note that the returned IO or memory base is a physical address
*/
SYSCALL_DEFINE3(pciconfig_iobase, long, which, unsignedlong, bus, unsignedlong, devfn)
{ struct pci_controller* hose; long result = -EOPNOTSUPP;
hose = pci_bus_to_hose(bus); if (!hose) return -ENODEV;
switch (which) { case IOBASE_BRIDGE_NUMBER: return (long)hose->first_busno; case IOBASE_MEMORY: return (long)hose->mem_offset[0]; case IOBASE_IO: return (long)hose->io_base_phys; case IOBASE_ISA_IO: return (long)isa_io_base; case IOBASE_ISA_MEM: return (long)isa_mem_base;
}
return result;
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.