Release 4.14 arch/x86/pci/common.c
/*
* 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
Person | Tokens | Prop | Commits | CommitProp |
Matthew Wilcox | 83 | 100.00% | 2 | 100.00% |
Total | 83 | 100.00% | 2 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Matthew Wilcox | 82 | 100.00% | 2 | 100.00% |
Total | 82 | 100.00% | 2 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Matthew Wilcox | 42 | 91.30% | 2 | 66.67% |
Jeff Garzik | 4 | 8.70% | 1 | 33.33% |
Total | 46 | 100.00% | 3 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Matthew Wilcox | 41 | 91.11% | 2 | 66.67% |
Jeff Garzik | 4 | 8.89% | 1 | 33.33% |
Total | 45 | 100.00% | 3 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Yinghai Lu | 29 | 96.67% | 1 | 50.00% |
Mathias Krause | 1 | 3.33% | 1 | 50.00% |
Total | 30 | 100.00% | 2 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Yinghai Lu | 13 | 100.00% | 1 | 100.00% |
Total | 13 | 100.00% | 1 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Mike Habeck | 69 | 51.88% | 1 | 33.33% |
Gary Hade | 63 | 47.37% | 1 | 33.33% |
Andrea Gelmini | 1 | 0.75% | 1 | 33.33% |
Total | 133 | 100.00% | 3 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Gary Hade | 18 | 54.55% | 1 | 25.00% |
Linus Torvalds (pre-git) | 10 | 30.30% | 2 | 50.00% |
Björn Helgaas | 5 | 15.15% | 1 | 25.00% |
Total | 33 | 100.00% | 4 | 100.00% |
void pcibios_add_bus(struct pci_bus *bus)
{
acpi_pci_add_bus(bus);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jiang Liu | 15 | 100.00% | 1 | 100.00% |
Total | 15 | 100.00% | 1 | 100.00% |
void pcibios_remove_bus(struct pci_bus *bus)
{
acpi_pci_remove_bus(bus);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jiang Liu | 15 | 100.00% | 1 | 100.00% |
Total | 15 | 100.00% | 1 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Matt Domsch | 36 | 94.74% | 1 | 33.33% |
Jeff Garzik | 1 | 2.63% | 1 | 33.33% |
Mathias Krause | 1 | 2.63% | 1 | 33.33% |
Total | 38 | 100.00% | 3 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Narendra K | 54 | 77.14% | 1 | 33.33% |
Jean Delvare | 15 | 21.43% | 1 | 33.33% |
Mathias Krause | 1 | 1.43% | 1 | 33.33% |
Total | 70 | 100.00% | 3 | 100.00% |
static int __init find_sort_method(const struct dmi_system_id *d)
{
dmi_walk(read_dmi_type_b1, (void *)d);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Narendra K | 22 | 81.48% | 1 | 33.33% |
Jean Delvare | 4 | 14.81% | 1 | 33.33% |
Mathias Krause | 1 | 3.70% | 1 | 33.33% |
Total | 27 | 100.00% | 3 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Bernhard Kaindl | 29 | 93.55% | 1 | 33.33% |
Mathias Krause | 1 | 3.23% | 1 | 33.33% |
Jeff Garzik | 1 | 3.23% | 1 | 33.33% |
Total | 31 | 100.00% | 3 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Björn Helgaas | 30 | 96.77% | 1 | 50.00% |
Mathias Krause | 1 | 3.23% | 1 | 50.00% |
Total | 31 | 100.00% | 2 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Yinghai Lu | 13 | 100.00% | 1 | 100.00% |
Total | 13 | 100.00% | 1 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Björn Helgaas | 98 | 83.05% | 4 | 44.44% |
Andy Grover | 11 | 9.32% | 1 | 11.11% |
Yijing Wang | 6 | 5.08% | 1 | 11.11% |
Yinghai Lu | 2 | 1.69% | 2 | 22.22% |
Matthew Wilcox | 1 | 0.85% | 1 | 11.11% |
Total | 118 | 100.00% | 9 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Dave Jones | 29 | 48.33% | 1 | 20.00% |
Ivan Kokshaysky | 21 | 35.00% | 1 | 20.00% |
Linus Torvalds | 5 | 8.33% | 1 | 20.00% |
Alex Nixon | 3 | 5.00% | 1 | 20.00% |
Jesse Barnes | 2 | 3.33% | 1 | 20.00% |
Total | 60 | 100.00% | 5 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Alex Nixon | 26 | 57.78% | 1 | 14.29% |
Matt Domsch | 9 | 20.00% | 1 | 14.29% |
Linus Torvalds (pre-git) | 4 | 8.89% | 3 | 42.86% |
Patrick Mochel | 3 | 6.67% | 1 | 14.29% |
Adrian-Ken Rueegsegger | 3 | 6.67% | 1 | 14.29% |
Total | 45 | 100.00% | 7 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 213 | 33.28% | 12 | 35.29% |
Stefan Assmann | 74 | 11.56% | 3 | 8.82% |
Yinghai Lu | 60 | 9.38% | 3 | 8.82% |
Andrew Morton | 57 | 8.91% | 2 | 5.88% |
Matt Domsch | 40 | 6.25% | 1 | 2.94% |
Gary Hade | 38 | 5.94% | 2 | 5.88% |
Jaya Kumar | 31 | 4.84% | 1 | 2.94% |
Len Brown | 28 | 4.38% | 2 | 5.88% |
Björn Helgaas | 20 | 3.12% | 1 | 2.94% |
Andi Kleen | 20 | 3.12% | 1 | 2.94% |
Mike Habeck | 20 | 3.12% | 1 | 2.94% |
Andy Grover | 17 | 2.66% | 1 | 2.94% |
John Clemens | 13 | 2.03% | 1 | 2.94% |
Linus Torvalds | 8 | 1.25% | 2 | 5.88% |
Myron Stowe | 1 | 0.16% | 1 | 2.94% |
Total | 640 | 100.00% | 34 | 100.00% |
unsigned int pcibios_assign_all_busses(void)
{
return (pci_probe & PCI_ASSIGN_ALL_BUSSES) ? 1 : 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds | 19 | 100.00% | 1 | 100.00% |
Total | 19 | 100.00% | 1 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Keith Busch | 33 | 100.00% | 1 | 100.00% |
Total | 33 | 100.00% | 1 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Keith Busch | 30 | 100.00% | 1 | 100.00% |
Total | 30 | 100.00% | 1 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Keith Busch | 64 | 100.00% | 1 | 100.00% |
Total | 64 | 100.00% | 1 | 100.00% |
#else
static void set_dma_domain_ops(struct pci_dev *pdev) {}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Keith Busch | 10 | 100.00% | 1 | 100.00% |
Total | 10 | 100.00% | 1 | 100.00% |
#endif
static void set_dev_domain_options(struct pci_dev *pdev)
{
if (is_vmd(pdev->bus))
pdev->hotplug_user_indicators = 1;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Keith Busch | 26 | 100.00% | 1 | 100.00% |
Total | 26 | 100.00% | 1 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Matthew Garrett | 168 | 83.58% | 1 | 20.00% |
Matt Fleming | 19 | 9.45% | 1 | 20.00% |
Keith Busch | 10 | 4.98% | 2 | 40.00% |
Tom Lendacky | 4 | 1.99% | 1 | 20.00% |
Total | 201 | 100.00% | 5 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Björn Helgaas | 36 | 70.59% | 1 | 20.00% |
Linus Torvalds (pre-git) | 14 | 27.45% | 3 | 60.00% |
Andy Grover | 1 | 1.96% | 1 | 20.00% |
Total | 51 | 100.00% | 5 | 100.00% |
void pcibios_disable_device (struct pci_dev *dev)
{
if (!pci_dev_msi_enabled(dev) && pcibios_disable_irq)
pcibios_disable_irq(dev);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Rafael J. Wysocki | 18 | 72.00% | 1 | 50.00% |
Björn Helgaas | 7 | 28.00% | 1 | 50.00% |
Total | 25 | 100.00% | 2 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Rui Y Wang | 27 | 100.00% | 1 | 100.00% |
Total | 27 | 100.00% | 1 | 100.00% |
#endif
int pci_ext_cfg_avail(void)
{
if (raw_pci_ext_ops)
return 1;
else
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Patterson | 17 | 94.44% | 1 | 50.00% |
Taku Izumi | 1 | 5.56% | 1 | 50.00% |
Total | 18 | 100.00% | 2 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andy Gospodarek | 340 | 10.69% | 1 | 0.95% |
Linus Torvalds (pre-git) | 278 | 8.74% | 23 | 21.90% |
Matthew Wilcox | 270 | 8.49% | 3 | 2.86% |
Matt Domsch | 228 | 7.17% | 2 | 1.90% |
Yinghai Lu | 225 | 7.08% | 6 | 5.71% |
Björn Helgaas | 222 | 6.98% | 8 | 7.62% |
Keith Busch | 210 | 6.60% | 2 | 1.90% |
Matthew Garrett | 171 | 5.38% | 1 | 0.95% |
Gary Hade | 119 | 3.74% | 2 | 1.90% |
Narendra K | 118 | 3.71% | 2 | 1.90% |
Michal Schmidt | 116 | 3.65% | 2 | 1.90% |
Stefan Assmann | 94 | 2.96% | 3 | 2.86% |
Mike Habeck | 89 | 2.80% | 1 | 0.95% |
Bernhard Kaindl | 85 | 2.67% | 1 | 0.95% |
Charlotte Richardson | 62 | 1.95% | 1 | 0.95% |
Andrew Morton | 60 | 1.89% | 2 | 1.90% |
Linus Torvalds | 36 | 1.13% | 4 | 3.81% |
Juha Laiho | 36 | 1.13% | 1 | 0.95% |
Jaya Kumar | 35 | 1.10% | 1 | 0.95% |
Len Brown | 33 | 1.04% | 2 | 1.90% |
Jiang Liu | 33 | 1.04% | 1 | 0.95% |
Rui Y Wang | 32 | 1.01% | 1 | 0.95% |
Alex Nixon | 29 | 0.91% | 1 | 0.95% |
Andy Grover | 29 | 0.91% | 2 | 1.90% |
Dave Jones | 29 | 0.91% | 1 | 0.95% |
Ivan Kokshaysky | 21 | 0.66% | 1 | 0.95% |
Andi Kleen | 20 | 0.63% | 1 | 0.95% |
Jean Delvare | 19 | 0.60% | 1 | 0.95% |
Matt Fleming | 19 | 0.60% | 1 | 0.95% |
Rafael J. Wysocki | 18 | 0.57% | 1 | 0.95% |
Andrew Patterson | 17 | 0.53% | 1 | 0.95% |
John Clemens | 13 | 0.41% | 1 | 0.95% |
Jeff Garzik | 10 | 0.31% | 2 | 1.90% |
Mathias Krause | 8 | 0.25% | 1 | 0.95% |
Myron Stowe | 8 | 0.25% | 2 | 1.90% |
Jan Beulich | 6 | 0.19% | 2 | 1.90% |
Yijing Wang | 6 | 0.19% | 1 | 0.95% |
Jesse Barnes | 6 | 0.19% | 2 | 1.90% |
Thomas Gleixner | 5 | 0.16% | 3 | 2.86% |
Tony Camuso | 4 | 0.13% | 1 | 0.95% |
Tom Lendacky | 4 | 0.13% | 1 | 0.95% |
Adrian-Ken Rueegsegger | 3 | 0.09% | 1 | 0.95% |
Martin J. Bligh | 3 | 0.09% | 1 | 0.95% |
Patrick Mochel | 3 | 0.09% | 1 | 0.95% |
Tom Rini | 3 | 0.09% | 1 | 0.95% |
Tejun Heo | 1 | 0.03% | 1 | 0.95% |
Taku Izumi | 1 | 0.03% | 1 | 0.95% |
Adrian Bunk | 1 | 0.03% | 1 | 0.95% |
Andrea Gelmini | 1 | 0.03% | 1 | 0.95% |
Jaswinder Singh Rajput | 1 | 0.03% | 1 | 0.95% |
Total | 3180 | 100.00% | 105 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.