cregit-Linux how code gets into the kernel

Release 4.11 arch/x86/pci/legacy.c

Directory: arch/x86/pci
/*
 * legacy.c - traditional, old school PCI bus probing
 */
#include <linux/init.h>
#include <linux/export.h>
#include <linux/pci.h>
#include <asm/pci_x86.h>

/*
 * Discover remaining PCI buses in case there are peer host bridges.
 * We use the number of last PCI bus provided by the PCI BIOS.
 */

static void pcibios_fixup_peer_bridges(void) { int n; if (pcibios_last_bus <= 0 || pcibios_last_bus > 0xff) return; DBG("PCI: Peer bridge fixup\n"); for (n=0; n <= pcibios_last_bus; n++) pcibios_scan_specific_bus(n); }

Contributors

PersonTokensPropCommitsCommitProp
Patrick Mochel3782.22%125.00%
Aristeu Sergio Rozanski Filho613.33%125.00%
Andi Kleen12.22%125.00%
Yinghai Lu12.22%125.00%
Total45100.00%4100.00%


int __init pci_legacy_init(void) { if (!raw_pci_ops) { printk("PCI: System does not support PCI\n"); return 0; } printk("PCI: Probing PCI hardware\n"); pcibios_scan_root(0); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Aristeu Sergio Rozanski Filho36100.00%1100.00%
Total36100.00%1100.00%


void pcibios_scan_specific_bus(int busn) { int devfn; u32 l; if (pci_find_bus(0, busn)) return; for (devfn = 0; devfn < 256; devfn += 8) { if (!raw_pci_read(0, busn, devfn, PCI_VENDOR_ID, 2, &l) && l != 0x0000 && l != 0xffff) { DBG("Found device at %02x:%02x [%04x]\n", busn, devfn, l); printk(KERN_INFO "PCI: Discovered peer bus %02x\n", busn); pcibios_scan_root(busn); return; } } }

Contributors

PersonTokensPropCommitsCommitProp
Patrick Mochel6367.02%114.29%
Aristeu Sergio Rozanski Filho1617.02%114.29%
Matthew Wilcox1313.83%342.86%
Björn Helgaas11.06%114.29%
Greg Kroah-Hartman11.06%114.29%
Total94100.00%7100.00%

EXPORT_SYMBOL_GPL(pcibios_scan_specific_bus);
static int __init pci_subsys_init(void) { /* * The init function returns an non zero value when * pci_legacy_init should be invoked. */ if (x86_init.pci.init()) pci_legacy_init(); pcibios_fixup_peer_bridges(); x86_init.pci.init_irq(); pcibios_init(); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Robert Richter2052.63%342.86%
Thomas Gleixner1436.84%228.57%
Yinghai Lu37.89%114.29%
Alexander Kuleshov12.63%114.29%
Total38100.00%7100.00%

subsys_initcall(pci_subsys_init);

Overall Contributors

PersonTokensPropCommitsCommitProp
Patrick Mochel11146.84%15.00%
Aristeu Sergio Rozanski Filho5824.47%15.00%
Robert Richter218.86%315.00%
Thomas Gleixner145.91%210.00%
Matthew Wilcox135.49%315.00%
Mauro Carvalho Chehab52.11%15.00%
Yinghai Lu41.69%210.00%
Paul Gortmaker31.27%15.00%
Tom Rini31.27%15.00%
Björn Helgaas10.42%15.00%
Jaswinder Singh Rajput10.42%15.00%
Greg Kroah-Hartman10.42%15.00%
Andi Kleen10.42%15.00%
Alexander Kuleshov10.42%15.00%
Total237100.00%20100.00%
Directory: arch/x86/pci
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.