cregit-Linux how code gets into the kernel

Release 4.14 arch/x86/pci/common.c

Directory: arch/x86/pci
/*
 *      Low-Level PCI Support for PC
 *
 *      (c) 1999--2000 Martin Mares <mj@ucw.cz>
 */

#include <linux/sched.h>
#include <linux/pci.h>
#include <linux/pci-acpi.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/dmi.h>
#include <linux/slab.h>

#include <asm/acpi.h>
#include <asm/segment.h>
#include <asm/io.h>
#include <asm/smp.h>
#include <asm/pci_x86.h>
#include <asm/setup.h>


unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
				PCI_PROBE_MMCONF;


unsigned int pci_early_dump_regs;

static int pci_bf_sort;

int pci_routeirq;

int noioapicquirk;
#ifdef CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS

int noioapicreroute = 0;
#else

int noioapicreroute = 1;
#endif

int pcibios_last_bus = -1;

unsigned long pirq_table_addr;

const struct pci_raw_ops *__read_mostly raw_pci_ops;

const struct pci_raw_ops *__read_mostly raw_pci_ext_ops;


int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, int reg, int len, u32 *val) { if (domain == 0 && reg < 256 && raw_pci_ops) return raw_pci_ops->read(domain, bus, devfn, reg, len, val); if (raw_pci_ext_ops) return raw_pci_ext_ops->read(domain, bus, devfn, reg, len, val); return -EINVAL; }

Contributors

PersonTokensPropCommitsCommitProp
Matthew Wilcox83100.00%2100.00%
Total83100.00%2100.00%


int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn, int reg, int len, u32 val) { if (domain == 0 && reg < 256 && raw_pci_ops) return raw_pci_ops->write(domain, bus, devfn, reg, len, val); if (raw_pci_ext_ops) return raw_pci_ext_ops->write(domain, bus, devfn, reg, len, val); return -EINVAL; }

Contributors

PersonTokensPropCommitsCommitProp
Matthew Wilcox82100.00%2100.00%
Total82100.00%2100.00%


static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value) { return raw_pci_read(pci_domain_nr(bus), bus->number, devfn, where, size, value); }

Contributors

PersonTokensPropCommitsCommitProp
Matthew Wilcox4291.30%266.67%
Jeff Garzik48.70%133.33%
Total46100.00%3100.00%


static int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value) { return raw_pci_write(pci_domain_nr(bus), bus->number, devfn, where, size, value); }

Contributors

PersonTokensPropCommitsCommitProp
Matthew Wilcox4191.11%266.67%
Jeff Garzik48.89%133.33%
Total45100.00%3100.00%

struct pci_ops pci_root_ops = { .read = pci_read, .write = pci_write, }; /* * This interrupt-safe spinlock protects all accesses to PCI configuration * space, except for the mmconfig (ECAM) based operations. */ DEFINE_RAW_SPINLOCK(pci_config_lock);
static int __init can_skip_ioresource_align(const struct dmi_system_id *d) { pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Yinghai Lu2996.67%150.00%
Mathias Krause13.33%150.00%
Total30100.00%2100.00%

static const struct dmi_system_id can_skip_pciprobe_dmi_table[] __initconst = { /* * Systems where PCI IO resource ISA alignment can be skipped * when the ISA enable bit in the bridge control is not set */ { .callback = can_skip_ioresource_align, .ident = "IBM System x3800", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), DMI_MATCH(DMI_PRODUCT_NAME, "x3800"), }, }, { .callback = can_skip_ioresource_align, .ident = "IBM System x3850", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), DMI_MATCH(DMI_PRODUCT_NAME, "x3850"), }, }, { .callback = can_skip_ioresource_align, .ident = "IBM System x3950", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), DMI_MATCH(DMI_PRODUCT_NAME, "x3950"), }, }, {} };
void __init dmi_check_skip_isa_align(void) { dmi_check_system(can_skip_pciprobe_dmi_table); }

Contributors

PersonTokensPropCommitsCommitProp
Yinghai Lu13100.00%1100.00%
Total13100.00%1100.00%


static void pcibios_fixup_device_resources(struct pci_dev *dev) { struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE]; struct resource *bar_r; int bar; if (pci_probe & PCI_NOASSIGN_BARS) { /* * If the BIOS did not assign the BAR, zero out the * resource so the kernel doesn't attempt to assign * it later on in pci_assign_unassigned_resources */ for (bar = 0; bar <= PCI_STD_RESOURCE_END; bar++) { bar_r = &dev->resource[bar]; if (bar_r->start == 0 && bar_r->end != 0) { bar_r->flags = 0; bar_r->end = 0; } } } if (pci_probe & PCI_NOASSIGN_ROMS) { if (rom_r->parent) return; if (rom_r->start) { /* we deal with BIOS assigned ROM later */ return; } rom_r->start = rom_r->end = rom_r->flags = 0; } }

Contributors

PersonTokensPropCommitsCommitProp
Mike Habeck6951.88%133.33%
Gary Hade6347.37%133.33%
Andrea Gelmini10.75%133.33%
Total133100.00%3100.00%

/* * Called after each bus is probed, but before its children * are examined. */
void pcibios_fixup_bus(struct pci_bus *b) { struct pci_dev *dev; pci_read_bridge_bases(b); list_for_each_entry(dev, &b->devices, bus_list) pcibios_fixup_device_resources(dev); }

Contributors

PersonTokensPropCommitsCommitProp
Gary Hade1854.55%125.00%
Linus Torvalds (pre-git)1030.30%250.00%
Björn Helgaas515.15%125.00%
Total33100.00%4100.00%


void pcibios_add_bus(struct pci_bus *bus) { acpi_pci_add_bus(bus); }

Contributors

PersonTokensPropCommitsCommitProp
Jiang Liu15100.00%1100.00%
Total15100.00%1100.00%


void pcibios_remove_bus(struct pci_bus *bus) { acpi_pci_remove_bus(bus); }

Contributors

PersonTokensPropCommitsCommitProp
Jiang Liu15100.00%1100.00%
Total15100.00%1100.00%

/* * Only use DMI information to set this if nothing was passed * on the kernel command line (which was parsed earlier). */
static int __init set_bf_sort(const struct dmi_system_id *d) { if (pci_bf_sort == pci_bf_sort_default) { pci_bf_sort = pci_dmi_bf; printk(KERN_INFO "PCI: %s detected, enabling pci=bfsort.\n", d->ident); } return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Matt Domsch3694.74%133.33%
Jeff Garzik12.63%133.33%
Mathias Krause12.63%133.33%
Total38100.00%3100.00%


static void __init read_dmi_type_b1(const struct dmi_header *dm, void *private_data) { u8 *data = (u8 *)dm + 4; if (dm->type != 0xB1) return; if ((((*(u32 *)data) >> 9) & 0x03) == 0x01) set_bf_sort((const struct dmi_system_id *)private_data); }

Contributors

PersonTokensPropCommitsCommitProp
Narendra K5477.14%133.33%
Jean Delvare1521.43%133.33%
Mathias Krause11.43%133.33%
Total70100.00%3100.00%


static int __init find_sort_method(const struct dmi_system_id *d) { dmi_walk(read_dmi_type_b1, (void *)d); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Narendra K2281.48%133.33%
Jean Delvare414.81%133.33%
Mathias Krause13.70%133.33%
Total27100.00%3100.00%

/* * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus) */ #ifdef __i386__
static int __init assign_all_busses(const struct dmi_system_id *d) { pci_probe |= PCI_ASSIGN_ALL_BUSSES; printk(KERN_INFO "%s detected: enabling PCI bus# renumbering" " (pci=assign-busses)\n", d->ident); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Bernhard Kaindl2993.55%133.33%
Mathias Krause13.23%133.33%
Jeff Garzik13.23%133.33%
Total31100.00%3100.00%

#endif
static int __init set_scan_all(const struct dmi_system_id *d) { printk(KERN_INFO "PCI: %s detected, enabling pci=pcie_scan_all\n", d->ident); pci_add_flags(PCI_SCAN_ALL_PCIE_DEVS); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Björn Helgaas3096.77%150.00%
Mathias Krause13.23%150.00%
Total31100.00%2100.00%

static const struct dmi_system_id pciprobe_dmi_table[] __initconst = { #ifdef __i386__ /* * Laptops which need pci=assign-busses to see Cardbus cards */ { .callback = assign_all_busses, .ident = "Samsung X20 Laptop", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Samsung Electronics"), DMI_MATCH(DMI_PRODUCT_NAME, "SX20S"), }, }, #endif /* __i386__ */ { .callback = set_bf_sort, .ident = "Dell PowerEdge 1950", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell"), DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 1950"), }, }, { .callback = set_bf_sort, .ident = "Dell PowerEdge 1955", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell"), DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 1955"), }, }, { .callback = set_bf_sort, .ident = "Dell PowerEdge 2900", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell"), DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2900"), }, }, { .callback = set_bf_sort, .ident = "Dell PowerEdge 2950", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell"), DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2950"), }, }, { .callback = set_bf_sort, .ident = "Dell PowerEdge R900", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell"), DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R900"), }, }, { .callback = find_sort_method, .ident = "Dell System", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant BL20p G3", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL20p G3"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant BL20p G4", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL20p G4"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant BL30p G1", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL30p G1"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant BL25p G1", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL25p G1"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant BL35p G1", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL35p G1"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant BL45p G1", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL45p G1"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant BL45p G2", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL45p G2"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant BL460c G1", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL460c G1"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant BL465c G1", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL465c G1"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant BL480c G1", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL480c G1"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant BL685c G1", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL685c G1"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant DL360", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL360"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant DL380", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL380"), }, }, #ifdef __i386__ { .callback = assign_all_busses, .ident = "Compaq EVO N800c", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Compaq"), DMI_MATCH(DMI_PRODUCT_NAME, "EVO N800c"), }, }, #endif { .callback = set_bf_sort, .ident = "HP ProLiant DL385 G2", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"), }, }, { .callback = set_bf_sort, .ident = "HP ProLiant DL585 G2", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"), }, }, { .callback = set_scan_all, .ident = "Stratus/NEC ftServer", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Stratus"), DMI_MATCH(DMI_PRODUCT_NAME, "ftServer"), }, }, { .callback = set_scan_all, .ident = "Stratus/NEC ftServer", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "NEC"), DMI_MATCH(DMI_PRODUCT_NAME, "Express5800/R32"), }, }, { .callback = set_scan_all, .ident = "Stratus/NEC ftServer", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "NEC"), DMI_MATCH(DMI_PRODUCT_NAME, "Express5800/R31"), }, }, {} };
void __init dmi_check_pciprobe(void) { dmi_check_system(pciprobe_dmi_table); }

Contributors

PersonTokensPropCommitsCommitProp
Yinghai Lu13100.00%1100.00%
Total13100.00%1100.00%


void pcibios_scan_root(int busnum) { struct pci_bus *bus; struct pci_sysdata *sd; LIST_HEAD(resources); sd = kzalloc(sizeof(*sd), GFP_KERNEL); if (!sd) { printk(KERN_ERR "PCI: OOM, skipping PCI bus %02x\n", busnum); return; } sd->node = x86_pci_root_bus_node(busnum); x86_pci_root_bus_resources(busnum, &resources); printk(KERN_DEBUG "PCI: Probing PCI hardware (bus %02x)\n", busnum); bus = pci_scan_root_bus(NULL, busnum, &pci_root_ops, sd, &resources); if (!bus) { pci_free_resource_list(&resources); kfree(sd); return; } pci_bus_add_devices(bus); }

Contributors

PersonTokensPropCommitsCommitProp
Björn Helgaas9883.05%444.44%
Andy Grover119.32%111.11%
Yijing Wang65.08%111.11%
Yinghai Lu21.69%222.22%
Matthew Wilcox10.85%111.11%
Total118100.00%9100.00%


void __init pcibios_set_cache_line_size(void) { struct cpuinfo_x86 *c = &boot_cpu_data; /* * Set PCI cacheline size to that of the CPU if the CPU has reported it. * (For older CPUs that don't support cpuid, we se it to 32 bytes * It's also good for 386/486s (which actually have 16) * as quite a few PCI devices do not support smaller values. */ if (c->x86_clflush_size > 0) { pci_dfl_cache_line_size = c->x86_clflush_size >> 2; printk(KERN_DEBUG "PCI: pci_cache_line_size set to %d bytes\n", pci_dfl_cache_line_size << 2); } else { pci_dfl_cache_line_size = 32 >> 2; printk(KERN_DEBUG "PCI: Unknown cacheline size. Setting to 32 bytes\n"); } }

Contributors

PersonTokensPropCommitsCommitProp
Dave Jones2948.33%120.00%
Ivan Kokshaysky2135.00%120.00%
Linus Torvalds58.33%120.00%
Alex Nixon35.00%120.00%
Jesse Barnes23.33%120.00%
Total60100.00%5100.00%


int __init pcibios_init(void) { if (!raw_pci_ops && !raw_pci_ext_ops) { printk(KERN_WARNING "PCI: System does not support PCI\n"); return 0; } pcibios_set_cache_line_size(); pcibios_resource_survey(); if (pci_bf_sort >= pci_force_bf) pci_sort_breadthfirst(); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Alex Nixon2657.78%114.29%
Matt Domsch920.00%114.29%
Linus Torvalds (pre-git)48.89%342.86%
Patrick Mochel36.67%114.29%
Adrian-Ken Rueegsegger36.67%114.29%
Total45100.00%7100.00%


char *__init pcibios_setup(char *str) { if (!strcmp(str, "off")) { pci_probe = 0; return NULL; } else if (!strcmp(str, "bfsort")) { pci_bf_sort = pci_force_bf; return NULL; } else if (!strcmp(str, "nobfsort")) { pci_bf_sort = pci_force_nobf; return NULL; } #ifdef CONFIG_PCI_BIOS else if (!strcmp(str, "bios")) { pci_probe = PCI_PROBE_BIOS; return NULL; } else if (!strcmp(str, "nobios")) { pci_probe &= ~PCI_PROBE_BIOS; return NULL; } else if (!strcmp(str, "biosirq")) { pci_probe |= PCI_BIOS_IRQ_SCAN; return NULL; } else if (!strncmp(str, "pirqaddr=", 9)) { pirq_table_addr = simple_strtoul(str+9, NULL, 0); return NULL; } #endif #ifdef CONFIG_PCI_DIRECT else if (!strcmp(str, "conf1")) { pci_probe = PCI_PROBE_CONF1 | PCI_NO_CHECKS; return NULL; } else if (!strcmp(str, "conf2")) { pci_probe = PCI_PROBE_CONF2 | PCI_NO_CHECKS; return NULL; } #endif #ifdef CONFIG_PCI_MMCONFIG else if (!strcmp(str, "nommconf")) { pci_probe &= ~PCI_PROBE_MMCONF; return NULL; } else if (!strcmp(str, "check_enable_amd_mmconf")) { pci_probe |= PCI_CHECK_ENABLE_AMD_MMCONF; return NULL; } #endif else if (!strcmp(str, "noacpi")) { acpi_noirq_set(); return NULL; } else if (!strcmp(str, "noearly")) { pci_probe |= PCI_PROBE_NOEARLY; return NULL; } else if (!strcmp(str, "usepirqmask")) { pci_probe |= PCI_USE_PIRQ_MASK; return NULL; } else if (!strncmp(str, "irqmask=", 8)) { pcibios_irq_mask = simple_strtol(str+8, NULL, 0); return NULL; } else if (!strncmp(str, "lastbus=", 8)) { pcibios_last_bus = simple_strtol(str+8, NULL, 0); return NULL; } else if (!strcmp(str, "rom")) { pci_probe |= PCI_ASSIGN_ROMS; return NULL; } else if (!strcmp(str, "norom")) { pci_probe |= PCI_NOASSIGN_ROMS; return NULL; } else if (!strcmp(str, "nobar")) { pci_probe |= PCI_NOASSIGN_BARS; return NULL; } else if (!strcmp(str, "assign-busses")) { pci_probe |= PCI_ASSIGN_ALL_BUSSES; return NULL; } else if (!strcmp(str, "use_crs")) { pci_probe |= PCI_USE__CRS; return NULL; } else if (!strcmp(str, "nocrs")) { pci_probe |= PCI_ROOT_NO_CRS; return NULL; } else if (!strcmp(str, "earlydump")) { pci_early_dump_regs = 1; return NULL; } else if (!strcmp(str, "routeirq")) { pci_routeirq = 1; return NULL; } else if (!strcmp(str, "skip_isa_align")) { pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; return NULL; } else if (!strcmp(str, "noioapicquirk")) { noioapicquirk = 1; return NULL; } else if (!strcmp(str, "ioapicreroute")) { if (noioapicreroute != -1) noioapicreroute = 0; return NULL; } else if (!strcmp(str, "noioapicreroute")) { if (noioapicreroute != -1) noioapicreroute = 1; return NULL; } return str; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)21333.28%1235.29%
Stefan Assmann7411.56%38.82%
Yinghai Lu609.38%38.82%
Andrew Morton578.91%25.88%
Matt Domsch406.25%12.94%
Gary Hade385.94%25.88%
Jaya Kumar314.84%12.94%
Len Brown284.38%25.88%
Björn Helgaas203.12%12.94%
Andi Kleen203.12%12.94%
Mike Habeck203.12%12.94%
Andy Grover172.66%12.94%
John Clemens132.03%12.94%
Linus Torvalds81.25%25.88%
Myron Stowe10.16%12.94%
Total640100.00%34100.00%


unsigned int pcibios_assign_all_busses(void) { return (pci_probe & PCI_ASSIGN_ALL_BUSSES) ? 1 : 0; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds19100.00%1100.00%
Total19100.00%1100.00%

#if defined(CONFIG_X86_DEV_DMA_OPS) && defined(CONFIG_PCI_DOMAINS) static LIST_HEAD(dma_domain_list); static DEFINE_SPINLOCK(dma_domain_list_lock);
void add_dma_domain(struct dma_domain *domain) { spin_lock(&dma_domain_list_lock); list_add(&domain->node, &dma_domain_list); spin_unlock(&dma_domain_list_lock); }

Contributors

PersonTokensPropCommitsCommitProp
Keith Busch33100.00%1100.00%
Total33100.00%1100.00%

EXPORT_SYMBOL_GPL(add_dma_domain);
void del_dma_domain(struct dma_domain *domain) { spin_lock(&dma_domain_list_lock); list_del(&domain->node); spin_unlock(&dma_domain_list_lock); }

Contributors

PersonTokensPropCommitsCommitProp
Keith Busch30100.00%1100.00%
Total30100.00%1100.00%

EXPORT_SYMBOL_GPL(del_dma_domain);
static void set_dma_domain_ops(struct pci_dev *pdev) { struct dma_domain *domain; spin_lock(&dma_domain_list_lock); list_for_each_entry(domain, &dma_domain_list, node) { if (pci_domain_nr(pdev->bus) == domain->domain_nr) { pdev->dev.dma_ops = domain->dma_ops; break; } } spin_unlock(&dma_domain_list_lock); }

Contributors

PersonTokensPropCommitsCommitProp
Keith Busch64100.00%1100.00%
Total64100.00%1100.00%

#else
static void set_dma_domain_ops(struct pci_dev *pdev) {}

Contributors

PersonTokensPropCommitsCommitProp
Keith Busch10100.00%1100.00%
Total10100.00%1100.00%

#endif
static void set_dev_domain_options(struct pci_dev *pdev) { if (is_vmd(pdev->bus)) pdev->hotplug_user_indicators = 1; }

Contributors

PersonTokensPropCommitsCommitProp
Keith Busch26100.00%1100.00%
Total26100.00%1100.00%


int pcibios_add_device(struct pci_dev *dev) { struct setup_data *data; struct pci_setup_rom *rom; u64 pa_data; pa_data = boot_params.hdr.setup_data; while (pa_data) { data = memremap(pa_data, sizeof(*rom), MEMREMAP_WB); if (!data) return -ENOMEM; if (data->type == SETUP_PCI) { rom = (struct pci_setup_rom *)data; if ((pci_domain_nr(dev->bus) == rom->segment) && (dev->bus->number == rom->bus) && (PCI_SLOT(dev->devfn) == rom->device) && (PCI_FUNC(dev->devfn) == rom->function) && (dev->vendor == rom->vendor) && (dev->device == rom->devid)) { dev->rom = pa_data + offsetof(struct pci_setup_rom, romdata); dev->romlen = rom->pcilen; } } pa_data = data->next; memunmap(data); } set_dma_domain_ops(dev); set_dev_domain_options(dev); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Matthew Garrett16883.58%120.00%
Matt Fleming199.45%120.00%
Keith Busch104.98%240.00%
Tom Lendacky41.99%120.00%
Total201100.00%5100.00%


int pcibios_enable_device(struct pci_dev *dev, int mask) { int err; if ((err = pci_enable_resources(dev, mask)) < 0) return err; if (!pci_dev_msi_enabled(dev)) return pcibios_enable_irq(dev); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Björn Helgaas3670.59%120.00%
Linus Torvalds (pre-git)1427.45%360.00%
Andy Grover11.96%120.00%
Total51100.00%5100.00%


void pcibios_disable_device (struct pci_dev *dev) { if (!pci_dev_msi_enabled(dev) && pcibios_disable_irq) pcibios_disable_irq(dev); }

Contributors

PersonTokensPropCommitsCommitProp
Rafael J. Wysocki1872.00%150.00%
Björn Helgaas728.00%150.00%
Total25100.00%2100.00%

#ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
void pcibios_release_device(struct pci_dev *dev) { if (atomic_dec_return(&dev->enable_cnt) >= 0) pcibios_disable_device(dev); }

Contributors

PersonTokensPropCommitsCommitProp
Rui Y Wang27100.00%1100.00%
Total27100.00%1100.00%

#endif
int pci_ext_cfg_avail(void) { if (raw_pci_ext_ops) return 1; else return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Andrew Patterson1794.44%150.00%
Taku Izumi15.56%150.00%
Total18100.00%2100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Andy Gospodarek34010.69%10.95%
Linus Torvalds (pre-git)2788.74%2321.90%
Matthew Wilcox2708.49%32.86%
Matt Domsch2287.17%21.90%
Yinghai Lu2257.08%65.71%
Björn Helgaas2226.98%87.62%
Keith Busch2106.60%21.90%
Matthew Garrett1715.38%10.95%
Gary Hade1193.74%21.90%
Narendra K1183.71%21.90%
Michal Schmidt1163.65%21.90%
Stefan Assmann942.96%32.86%
Mike Habeck892.80%10.95%
Bernhard Kaindl852.67%10.95%
Charlotte Richardson621.95%10.95%
Andrew Morton601.89%21.90%
Linus Torvalds361.13%43.81%
Juha Laiho361.13%10.95%
Jaya Kumar351.10%10.95%
Len Brown331.04%21.90%
Jiang Liu331.04%10.95%
Rui Y Wang321.01%10.95%
Alex Nixon290.91%10.95%
Andy Grover290.91%21.90%
Dave Jones290.91%10.95%
Ivan Kokshaysky210.66%10.95%
Andi Kleen200.63%10.95%
Jean Delvare190.60%10.95%
Matt Fleming190.60%10.95%
Rafael J. Wysocki180.57%10.95%
Andrew Patterson170.53%10.95%
John Clemens130.41%10.95%
Jeff Garzik100.31%21.90%
Mathias Krause80.25%10.95%
Myron Stowe80.25%21.90%
Jan Beulich60.19%21.90%
Yijing Wang60.19%10.95%
Jesse Barnes60.19%21.90%
Thomas Gleixner50.16%32.86%
Tony Camuso40.13%10.95%
Tom Lendacky40.13%10.95%
Adrian-Ken Rueegsegger30.09%10.95%
Martin J. Bligh30.09%10.95%
Patrick Mochel30.09%10.95%
Tom Rini30.09%10.95%
Tejun Heo10.03%10.95%
Taku Izumi10.03%10.95%
Adrian Bunk10.03%10.95%
Andrea Gelmini10.03%10.95%
Jaswinder Singh Rajput10.03%10.95%
Total3180100.00%105100.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.