Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81126
b: refs/heads/master
c: be8cbcd
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Dec 20, 2007
1 parent 8d00c37 commit 6d2fa8f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d0264ce796e4e3d77fdadf72d6625f8e6c1c96bd
refs/heads/master: be8cbcd8896670a01ead7a29e33ffe29604ed734
22 changes: 22 additions & 0 deletions trunk/arch/powerpc/kernel/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);

static void __devinit __pcibios_fixup_bus(struct pci_bus *bus)
{
struct pci_controller *hose = pci_bus_to_host(bus);
struct pci_dev *dev = bus->self;

pr_debug("PCI: Fixup bus %d (%s)\n", bus->number, dev ? pci_name(dev) : "PHB");
Expand All @@ -793,6 +794,27 @@ static void __devinit __pcibios_fixup_bus(struct pci_bus *bus)
if (!res->flags || bus->self->transparent)
continue;

/* On PowerMac, Apple leaves bridge windows open over
* an inaccessible region of memory space (0...fffff)
* which is somewhat bogus, but that's what they think
* means disabled...
*
* We clear those to force them to be reallocated later
*
* We detect such regions by the fact that the base is
* equal to the pci_mem_offset of the host bridge and
* their size is smaller than 1M.
*/
if (res->start == hose->pci_mem_offset &&
res->end < 0x100000) {
printk(KERN_INFO
"PCI: Closing bogus Apple Firmware"
" region %d on bus 0x%02x\n",
i, bus->number);
res->flags = 0;
continue;
}

pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
pci_name(dev), i,
(unsigned long long)res->start,\
Expand Down

0 comments on commit 6d2fa8f

Please sign in to comment.