aboutsummaryrefslogtreecommitdiff
path: root/arch/parisc
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-10-14 10:13:31 -0400
committerKyle McMartin <kyle@shortfin.cabal.ca>2007-10-18 12:34:22 -0700
commit9611f61eb5baf22b6b6ed46c2c196c10e1fade6a (patch)
tree30bd8d782abc42a6f8b553f4c33bbba2dc8f9a31 /arch/parisc
parent26f0324922e50e0ef7677aaf96287b862c2fec61 (diff)
[PARISC] Fix infinite loop in /proc/iomem
pcibios_link_hba_resources() could corrupt the resource tree by inserting resources in the wrong place. Fix this by calling pci_claim_resource() for PCI-PCI bridges. Delete pcibios_link_hba_resources as we shouldn't need it any more. Also get rid of lba_claim_dev_resources() and just call pci_claim_resource() directly. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/pci.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c
index 563df0072de..8263d490b1b 100644
--- a/arch/parisc/kernel/pci.c
+++ b/arch/parisc/kernel/pci.c
@@ -194,31 +194,6 @@ void __init pcibios_init_bus(struct pci_bus *bus)
pci_write_config_word(dev, PCI_BRIDGE_CONTROL, bridge_ctl);
}
-
-/* KLUGE: Link the child and parent resources - generic PCI didn't */
-static void
-pcibios_link_hba_resources( struct resource *hba_res, struct resource *r)
-{
- if (!r->parent) {
- printk(KERN_EMERG "PCI: resource not parented! [%p-%p]\n",
- (void*) r->start, (void*) r->end);
- r->parent = hba_res;
-
- /* reverse link is harder *sigh* */
- if (r->parent->child) {
- if (r->parent->sibling) {
- struct resource *next = r->parent->sibling;
- while (next->sibling)
- next = next->sibling;
- next->sibling = r;
- } else {
- r->parent->sibling = r;
- }
- } else
- r->parent->child = r;
- }
-}
-
/* called by drivers/pci/setup-bus.c:pci_setup_bridge(). */
void __devinit pcibios_resource_to_bus(struct pci_dev *dev,
struct pci_bus_region *region, struct resource *res)
@@ -245,13 +220,6 @@ void __devinit pcibios_resource_to_bus(struct pci_dev *dev,
DBG_RES("pcibios_resource_to_bus(%02x %s [%lx,%lx])\n",
bus->number, res->flags & IORESOURCE_IO ? "IO" : "MEM",
region->start, region->end);
-
- /* KLUGE ALERT
- ** if this resource isn't linked to a "parent", then it seems
- ** to be a child of the HBA - lets link it in.
- */
- pcibios_link_hba_resources(&hba->io_space, bus->resource[0]);
- pcibios_link_hba_resources(&hba->lmmio_space, bus->resource[1]);
}
void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,