powerpc/pci: Don't add bogus empty resources to PHBs
When converting to use the new pci_add_resource_offset() we didn't properly account for empty resources (0 flags) and add those bogons to the PHBs. The result is some annoying messages in the log. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
4ea9008b75
commit
a0b8e76fac
@ -1540,12 +1540,16 @@ static void pcibios_setup_phb_resources(struct pci_controller *hose,
|
|||||||
res->flags = IORESOURCE_IO;
|
res->flags = IORESOURCE_IO;
|
||||||
#endif /* CONFIG_PPC32 */
|
#endif /* CONFIG_PPC32 */
|
||||||
}
|
}
|
||||||
|
if (res->flags) {
|
||||||
|
pr_debug("PCI: PHB IO resource = %016llx-%016llx [%lx]\n",
|
||||||
|
(unsigned long long)res->start,
|
||||||
|
(unsigned long long)res->end,
|
||||||
|
(unsigned long)res->flags);
|
||||||
|
pci_add_resource_offset(resources, res, pcibios_io_space_offset(hose));
|
||||||
|
|
||||||
pr_debug("PCI: PHB IO resource = %016llx-%016llx [%lx]\n",
|
pr_debug("PCI: PHB IO offset = %08lx\n",
|
||||||
(unsigned long long)res->start,
|
(unsigned long)hose->io_base_virt - _IO_BASE);
|
||||||
(unsigned long long)res->end,
|
}
|
||||||
(unsigned long)res->flags);
|
|
||||||
pci_add_resource_offset(resources, res, pcibios_io_space_offset(hose));
|
|
||||||
|
|
||||||
/* Hookup PHB Memory resources */
|
/* Hookup PHB Memory resources */
|
||||||
for (i = 0; i < 3; ++i) {
|
for (i = 0; i < 3; ++i) {
|
||||||
@ -1563,19 +1567,17 @@ static void pcibios_setup_phb_resources(struct pci_controller *hose,
|
|||||||
res->flags = IORESOURCE_MEM;
|
res->flags = IORESOURCE_MEM;
|
||||||
#endif /* CONFIG_PPC32 */
|
#endif /* CONFIG_PPC32 */
|
||||||
}
|
}
|
||||||
|
if (res->flags) {
|
||||||
pr_debug("PCI: PHB MEM resource %d = %016llx-%016llx [%lx]\n", i,
|
pr_debug("PCI: PHB MEM resource %d = %016llx-%016llx [%lx]\n", i,
|
||||||
(unsigned long long)res->start,
|
(unsigned long long)res->start,
|
||||||
(unsigned long long)res->end,
|
(unsigned long long)res->end,
|
||||||
(unsigned long)res->flags);
|
(unsigned long)res->flags);
|
||||||
pci_add_resource_offset(resources, res, hose->pci_mem_offset);
|
pci_add_resource_offset(resources, res, hose->pci_mem_offset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_debug("PCI: PHB MEM offset = %016llx\n",
|
pr_debug("PCI: PHB MEM offset = %016llx\n",
|
||||||
(unsigned long long)hose->pci_mem_offset);
|
(unsigned long long)hose->pci_mem_offset);
|
||||||
pr_debug("PCI: PHB IO offset = %08lx\n",
|
|
||||||
(unsigned long)hose->io_base_virt - _IO_BASE);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user