powerpc/pci: Don't try to allocate resources that will be reassigned
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 8 Jul 2016 06:37:18 +0000 (16:37 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 17 Jul 2016 06:42:49 +0000 (16:42 +1000)
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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/pci-common.c

index c6ac4f01dd563fbd6b8d4604e25af06464fcd00e..f93942b4b6a61a661aae7e4da92605eded111bd4 100644 (file)
@@ -1418,8 +1418,10 @@ void __init pcibios_resource_survey(void)
        /* Allocate and assign resources */
        list_for_each_entry(b, &pci_root_buses, node)
                pcibios_allocate_bus_resources(b);
-       pcibios_allocate_resources(0);
-       pcibios_allocate_resources(1);
+       if (!pci_has_flag(PCI_REASSIGN_ALL_RSRC)) {
+               pcibios_allocate_resources(0);
+               pcibios_allocate_resources(1);
+       }
 
        /* Before we start assigning unassigned resource, we try to reserve
         * the low IO area and the VGA memory area if they intersect the