Release 4.11 drivers/pci/host-bridge.c
/*
* host bridge related code
*/
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/module.h>
#include "pci.h"
static struct pci_bus *find_pci_root_bus(struct pci_bus *bus)
{
while (bus->parent)
bus = bus->parent;
return bus;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yinghai Lu | 28 | 100.00% | 3 | 100.00% |
Total | 28 | 100.00% | 3 | 100.00% |
struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus)
{
struct pci_bus *root_bus = find_pci_root_bus(bus);
return to_pci_host_bridge(root_bus->bridge);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yinghai Lu | 29 | 96.67% | 4 | 80.00% |
Aaron Lu | 1 | 3.33% | 1 | 20.00% |
Total | 30 | 100.00% | 5 | 100.00% |
struct device *pci_get_host_bridge_device(struct pci_dev *dev)
{
struct pci_bus *root_bus = find_pci_root_bus(dev->bus);
struct device *bridge = root_bus->bridge;
kobject_get(&bridge->kobj);
return bridge;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Murali Karicheri | 44 | 100.00% | 1 | 100.00% |
Total | 44 | 100.00% | 1 | 100.00% |
void pci_put_host_bridge_device(struct device *dev)
{
kobject_put(&dev->kobj);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Murali Karicheri | 18 | 100.00% | 1 | 100.00% |
Total | 18 | 100.00% | 1 | 100.00% |
void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
void (*release_fn)(struct pci_host_bridge *),
void *release_data)
{
bridge->release_fn = release_fn;
bridge->release_data = release_data;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yinghai Lu | 37 | 100.00% | 1 | 100.00% |
Total | 37 | 100.00% | 1 | 100.00% |
EXPORT_SYMBOL_GPL(pci_set_host_bridge_release);
void pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region,
struct resource *res)
{
struct pci_host_bridge *bridge = pci_find_host_bridge(bus);
struct resource_entry *window;
resource_size_t offset = 0;
resource_list_for_each_entry(window, &bridge->windows) {
if (resource_contains(window->res, res)) {
offset = window->offset;
break;
}
}
region->start = res->start - offset;
region->end = res->end - offset;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yinghai Lu | 85 | 96.59% | 2 | 50.00% |
Jiang Liu | 2 | 2.27% | 1 | 25.00% |
Aaron Lu | 1 | 1.14% | 1 | 25.00% |
Total | 88 | 100.00% | 4 | 100.00% |
EXPORT_SYMBOL(pcibios_resource_to_bus);
static bool region_contains(struct pci_bus_region *region1,
struct pci_bus_region *region2)
{
return region1->start <= region2->start && region1->end >= region2->end;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yinghai Lu | 33 | 100.00% | 1 | 100.00% |
Total | 33 | 100.00% | 1 | 100.00% |
void pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res,
struct pci_bus_region *region)
{
struct pci_host_bridge *bridge = pci_find_host_bridge(bus);
struct resource_entry *window;
resource_size_t offset = 0;
resource_list_for_each_entry(window, &bridge->windows) {
struct pci_bus_region bus_region;
if (resource_type(res) != resource_type(window->res))
continue;
bus_region.start = window->res->start - window->offset;
bus_region.end = window->res->end - window->offset;
if (region_contains(&bus_region, region)) {
offset = window->offset;
break;
}
}
res->start = region->start + offset;
res->end = region->end + offset;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yinghai Lu | 131 | 97.76% | 3 | 60.00% |
Jiang Liu | 2 | 1.49% | 1 | 20.00% |
Aaron Lu | 1 | 0.75% | 1 | 20.00% |
Total | 134 | 100.00% | 5 | 100.00% |
EXPORT_SYMBOL(pcibios_bus_to_resource);
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yinghai Lu | 366 | 83.18% | 5 | 55.56% |
Murali Karicheri | 62 | 14.09% | 1 | 11.11% |
Andrew Donnellan | 5 | 1.14% | 1 | 11.11% |
Jiang Liu | 4 | 0.91% | 1 | 11.11% |
Aaron Lu | 3 | 0.68% | 1 | 11.11% |
Total | 440 | 100.00% | 9 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.