All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC/PATCH] powerpc/pci: Don't try to allocate resources that will be reassigned
@ 2016-06-22  7:24 Benjamin Herrenschmidt
  2016-06-24 11:33 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2016-06-22  7:24 UTC (permalink / raw)
  To: linuxppc dev list

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);
 	}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC/PATCH] powerpc/pci: Don't try to allocate resources that will be reassigned
  2016-06-22  7:24 [RFC/PATCH] powerpc/pci: Don't try to allocate resources that will be reassigned Benjamin Herrenschmidt
@ 2016-06-24 11:33 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2016-06-24 11:33 UTC (permalink / raw)
  To: linuxppc dev list

On Wed, 2016-06-22 at 17:24 +1000, Benjamin Herrenschmidt wrote:
> 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 ;-)

The patch is crap, it was against one of my trees that has not the
right code in it. I'll post the real one as v2

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-24 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-22  7:24 [RFC/PATCH] powerpc/pci: Don't try to allocate resources that will be reassigned Benjamin Herrenschmidt
2016-06-24 11:33 ` Benjamin Herrenschmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.