diff options
Diffstat (limited to 'arch/powerpc/kernel/pci-common.c')
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 224e9a11765c..ea0c61e09b76 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -650,11 +650,18 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, | |||
650 | } | 650 | } |
651 | } | 651 | } |
652 | 652 | ||
653 | /* Out of paranoia, let's put the ISA hole last if any */ | 653 | /* If there's an ISA hole and the pci_mem_offset is -not- matching |
654 | if (isa_hole >= 0 && memno > 0 && isa_hole != (memno-1)) { | 654 | * the ISA hole offset, then we need to remove the ISA hole from |
655 | struct resource tmp = hose->mem_resources[isa_hole]; | 655 | * the resource list for that brige |
656 | hose->mem_resources[isa_hole] = hose->mem_resources[memno-1]; | 656 | */ |
657 | hose->mem_resources[memno-1] = tmp; | 657 | if (isa_hole >= 0 && hose->pci_mem_offset != isa_mb) { |
658 | unsigned int next = isa_hole + 1; | ||
659 | printk(KERN_INFO " Removing ISA hole at 0x%016llx\n", isa_mb); | ||
660 | if (next < memno) | ||
661 | memmove(&hose->mem_resources[isa_hole], | ||
662 | &hose->mem_resources[next], | ||
663 | sizeof(struct resource) * (memno - next)); | ||
664 | hose->mem_resources[--memno].flags = 0; | ||
658 | } | 665 | } |
659 | } | 666 | } |
660 | 667 | ||