Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330265
b: refs/heads/master
c: cf1a4cf
h: refs/heads/master
i:
  330263: 82efddb
v: v3
  • Loading branch information
Gavin Shan authored and Benjamin Herrenschmidt committed Sep 7, 2012
1 parent f43bf05 commit 9b68852
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fff34b3412b9401a76ba9d021db1bd91cb0e02b6
refs/heads/master: cf1a4cf8754afb248e498815c7957aeb4faca79f
16 changes: 12 additions & 4 deletions trunk/arch/powerpc/kernel/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,13 +960,14 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
if (i >= 3 && bus->self->transparent)
continue;

/* If we are going to re-assign everything, mark the resource
* as unset and move it down to 0
/* If we're going to reassign everything, we can
* shrink the P2P resource to have size as being
* of 0 in order to save space.
*/
if (pci_has_flag(PCI_REASSIGN_ALL_RSRC)) {
res->flags |= IORESOURCE_UNSET;
res->end -= res->start;
res->start = 0;
res->end = -1;
continue;
}

Expand Down Expand Up @@ -1228,7 +1229,14 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
pr_warning("PCI: Cannot allocate resource region "
"%d of PCI bridge %d, will remap\n", i, bus->number);
clear_resource:
res->start = res->end = 0;
/* The resource might be figured out when doing
* reassignment based on the resources required
* by the downstream PCI devices. Here we set
* the size of the resource to be 0 in order to
* save more space.
*/
res->start = 0;
res->end = -1;
res->flags = 0;
}

Expand Down

0 comments on commit 9b68852

Please sign in to comment.