Thread (2 messages) 2 messages, 1 author, 2016-06-24

[RFC/PATCH] powerpc/pci: Don't try to allocate resources that will be reassigned

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2016-06-22 07:24:45
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

When we know we will reassign all resources, trying (and failing)
to allocate them initially is fairly pointless and leads to a lot
of scary messages in the kernel log

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
--

This one probably needs testing on a few platforms but I think it's
correct ;-)

---
 arch/powerpc/kernel/pci-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index e723a32..2a67b16 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1360,9 +1360,9 @@ void __init pcibios_resource_survey(void)
 	struct pci_bus *b;
 
 	/* Allocate and assign resources */
+	list_for_each_entry(b, &pci_root_buses, node)
+		pcibios_allocate_bus_resources(b);
 	if (!pci_has_flag(PCI_REASSIGN_ALL_RSRC)) {
-		list_for_each_entry(b, &pci_root_buses, node)
-			pcibios_allocate_bus_resources(b);
 		pcibios_allocate_resources(0);
 		pcibios_allocate_resources(1);
 	}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help