cregit-Linux how code gets into the kernel

Release 4.18 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/jailhouse_para.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 stride = jailhouse_paravirt() ? 1 : 8; int devfn; u32 l; if (pci_find_bus(0, busn)) return; for (devfn = 0; devfn < 256; devfn += stride) { 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 Mochel6159.22%112.50%
Aristeu Sergio Rozanski Filho1615.53%112.50%
Matthew Wilcox1312.62%337.50%
Jan Kiszka1110.68%112.50%
Thomas Gleixner10.97%112.50%
Björn Helgaas10.97%112.50%
Total103100.00%8100.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 Mochel10942.41%14.76%
Aristeu Sergio Rozanski Filho4919.07%14.76%
Thomas Gleixner3212.45%314.29%
Robert Richter218.17%314.29%
Jan Kiszka145.45%14.76%
Matthew Wilcox135.06%314.29%
Mauro Carvalho Chehab51.95%14.76%
Yinghai Lu41.56%29.52%
Tom Rini31.17%14.76%
Paul Gortmaker31.17%14.76%
Jaswinder Singh Rajput10.39%14.76%
Alexander Kuleshov10.39%14.76%
Andi Kleen10.39%14.76%
Björn Helgaas10.39%14.76%
Total257100.00%21100.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.