cregit-Linux how code gets into the kernel

Release 4.14 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%
Yinghai Lu12.22%125.00%
Andi Kleen12.22%125.00%
Total45100.00%4100.00%


int __init pci_legacy_init(void) { if (!raw_pci_ops) return 1; pr_info("PCI: Probing PCI hardware\n"); pcibios_scan_root(0); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Aristeu Sergio Rozanski Filho2793.10%150.00%
Thomas Gleixner26.90%150.00%
Total29100.00%2100.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); pr_info("PCI: Discovered peer bus %02x\n", busn); pcibios_scan_root(busn); return; } } }

Contributors

PersonTokensPropCommitsCommitProp
Patrick Mochel6266.67%114.29%
Aristeu Sergio Rozanski Filho1617.20%114.29%
Matthew Wilcox1313.98%342.86%
Björn Helgaas11.08%114.29%
Thomas Gleixner11.08%114.29%
Total93100.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()) { if (pci_legacy_init()) { pr_info("PCI: System does not support PCI\n"); return -ENODEV; } } pcibios_fixup_peer_bridges(); x86_init.pci.init_irq(); pcibios_init(); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Thomas Gleixner2954.72%337.50%
Robert Richter2037.74%337.50%
Yinghai Lu35.66%112.50%
Alexander Kuleshov11.89%112.50%
Total53100.00%8100.00%

subsys_initcall(pci_subsys_init);

Overall Contributors

PersonTokensPropCommitsCommitProp
Patrick Mochel11045.08%15.00%
Aristeu Sergio Rozanski Filho4920.08%15.00%
Thomas Gleixner3213.11%315.00%
Robert Richter218.61%315.00%
Matthew Wilcox135.33%315.00%
Mauro Carvalho Chehab52.05%15.00%
Yinghai Lu41.64%210.00%
Tom Rini31.23%15.00%
Paul Gortmaker31.23%15.00%
Jaswinder Singh Rajput10.41%15.00%
Alexander Kuleshov10.41%15.00%
Björn Helgaas10.41%15.00%
Andi Kleen10.41%15.00%
Total244100.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.