setup-bus.c (f26e8817b235d8764363bffcc9cbfc61867371f2) | setup-bus.c (25e77388e1ab63e11e21d94a994eca227472aeed) |
---|---|
1/* 2 * drivers/pci/setup-bus.c 3 * 4 * Extruded from code written by 5 * Dave Rusling (david.rusling@reo.mts.dec.com) 6 * David Mosberger (davidm@cs.arizona.edu) 7 * David Miller (davem@redhat.com) 8 * --- 11 unchanged lines hidden (view full) --- 20#include <linux/init.h> 21#include <linux/kernel.h> 22#include <linux/module.h> 23#include <linux/pci.h> 24#include <linux/errno.h> 25#include <linux/ioport.h> 26#include <linux/cache.h> 27#include <linux/slab.h> | 1/* 2 * drivers/pci/setup-bus.c 3 * 4 * Extruded from code written by 5 * Dave Rusling (david.rusling@reo.mts.dec.com) 6 * David Mosberger (davidm@cs.arizona.edu) 7 * David Miller (davem@redhat.com) 8 * --- 11 unchanged lines hidden (view full) --- 20#include <linux/init.h> 21#include <linux/kernel.h> 22#include <linux/module.h> 23#include <linux/pci.h> 24#include <linux/errno.h> 25#include <linux/ioport.h> 26#include <linux/cache.h> 27#include <linux/slab.h> |
28#include <linux/acpi.h> |
|
28#include "pci.h" 29 30unsigned int pci_flags; 31 32struct pci_dev_resource { 33 struct list_head list; 34 struct resource *res; 35 struct pci_dev *dev; --- 63 unchanged lines hidden (view full) --- 99} 100 101static struct pci_dev_resource *res_to_dev_res(struct list_head *head, 102 struct resource *res) 103{ 104 struct pci_dev_resource *dev_res; 105 106 list_for_each_entry(dev_res, head, list) { | 29#include "pci.h" 30 31unsigned int pci_flags; 32 33struct pci_dev_resource { 34 struct list_head list; 35 struct resource *res; 36 struct pci_dev *dev; --- 63 unchanged lines hidden (view full) --- 100} 101 102static struct pci_dev_resource *res_to_dev_res(struct list_head *head, 103 struct resource *res) 104{ 105 struct pci_dev_resource *dev_res; 106 107 list_for_each_entry(dev_res, head, list) { |
107 if (dev_res->res == res) { 108 int idx = res - &dev_res->dev->resource[0]; 109 110 dev_printk(KERN_DEBUG, &dev_res->dev->dev, 111 "res[%d]=%pR res_to_dev_res add_size %llx min_align %llx\n", 112 idx, dev_res->res, 113 (unsigned long long)dev_res->add_size, 114 (unsigned long long)dev_res->min_align); 115 | 108 if (dev_res->res == res) |
116 return dev_res; | 109 return dev_res; |
117 } | |
118 } 119 120 return NULL; 121} 122 123static resource_size_t get_res_add_size(struct list_head *head, 124 struct resource *res) 125{ --- 1721 unchanged lines hidden (view full) --- 1847 /* dump the resource on buses */ 1848 pci_bus_dump_resources(bus); 1849} 1850 1851void __init pci_assign_unassigned_resources(void) 1852{ 1853 struct pci_bus *root_bus; 1854 | 110 } 111 112 return NULL; 113} 114 115static resource_size_t get_res_add_size(struct list_head *head, 116 struct resource *res) 117{ --- 1721 unchanged lines hidden (view full) --- 1839 /* dump the resource on buses */ 1840 pci_bus_dump_resources(bus); 1841} 1842 1843void __init pci_assign_unassigned_resources(void) 1844{ 1845 struct pci_bus *root_bus; 1846 |
1855 list_for_each_entry(root_bus, &pci_root_buses, node) | 1847 list_for_each_entry(root_bus, &pci_root_buses, node) { |
1856 pci_assign_unassigned_root_bus_resources(root_bus); | 1848 pci_assign_unassigned_root_bus_resources(root_bus); |
1849 1850 /* Make sure the root bridge has a companion ACPI device: */ 1851 if (ACPI_HANDLE(root_bus->bridge)) 1852 acpi_ioapic_add(ACPI_HANDLE(root_bus->bridge)); 1853 } |
|
1857} 1858 1859void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge) 1860{ 1861 struct pci_bus *parent = bridge->subordinate; 1862 LIST_HEAD(add_list); /* list of resources that 1863 want additional resources */ 1864 int tried_times = 0; --- 71 unchanged lines hidden --- | 1854} 1855 1856void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge) 1857{ 1858 struct pci_bus *parent = bridge->subordinate; 1859 LIST_HEAD(add_list); /* list of resources that 1860 want additional resources */ 1861 int tried_times = 0; --- 71 unchanged lines hidden --- |