From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liviu Dudau Subject: Re: [PATCH v12 10/12] PCI: Assign unassigned bus resources in pci_scan_root_bus() Date: Wed, 24 Sep 2014 02:18:51 +0100 Message-ID: <20140924011851.GD32643@bart.dudau.co.uk> References: <1411498874-9864-1-git-send-email-Liviu.Dudau@arm.com> <1411498874-9864-11-git-send-email-Liviu.Dudau@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1411498874-9864-11-git-send-email-Liviu.Dudau@arm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Liviu Dudau Cc: linux-arch , Grant Likely , Kukjin Kim , Russell King , Arnd Bergmann , Device Tree ML , linux-pci , Catalin Marinas , Linus Walleij , Jingoo Han , Will Deacon , LKML , Jason Gunthorpe , Rob Herring , Tanmay Inamdar , Suravee Suthikulanit , Benjamin Herrenschmidt , Bjorn Helgaas , Sinan Kaya , LAKML List-Id: linux-arch.vger.kernel.org On Tue, Sep 23, 2014 at 08:01:12PM +0100, Liviu Dudau wrote: > If the firmware has not assigned all the bus resources and > we are not just probing the PCIe busses, it makes sense to > assign the unassigned resources in pci_scan_root_bus(). > > Cc: Bjorn Helgaas > Cc: Arnd Bergmann > Cc: Jason Gunthorpe > Cc: Rob Herring > Signed-off-by: Liviu Dudau > --- > drivers/pci/probe.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > index ef891d2..508cf61 100644 > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -1953,6 +1953,9 @@ struct pci_bus *pci_scan_root_bus(struct device *parent, int bus, > if (!found) > pci_bus_update_busn_res_end(b, max); > > + if (!pci_has_flag(PCI_PROBE_ONLY)) > + pci_assign_unassigned_bus_resources(b); > + > pci_bus_add_devices(b); > return b; > } > -- > 2.1.0 > Bjorn, If you are OK with this patch, can you let me know how do you feel about making pci_scan_root_bus() set up the bus->msi pointer as well? Side note: I don't know exactly how to do it now, but setting bus->msi is needed by platforms that are based on my patches and want to use MSI, otherwise they have to open code pci_scan_root_bus() to set it. I haven't made any attempts to do it in this series as the GICv2m patches are not ready yet, but I can see the need arriving soon. Best regards, Liviu > -- > To unsubscribe from this list: send the line "unsubscribe linux-pci" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- ------------------- .oooO ( ) \ ( Oooo. \_) ( ) ) / (_/ One small step for me ... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dliviu.plus.com ([80.229.23.120]:59067 "EHLO smtp.dudau.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751801AbaIXBWO (ORCPT ); Tue, 23 Sep 2014 21:22:14 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.dudau.co.uk (Postfix) with SMTP id 21165FFDC6 for ; Wed, 24 Sep 2014 02:22:12 +0100 (BST) Date: Wed, 24 Sep 2014 02:18:51 +0100 From: Liviu Dudau Subject: Re: [PATCH v12 10/12] PCI: Assign unassigned bus resources in pci_scan_root_bus() Message-ID: <20140924011851.GD32643@bart.dudau.co.uk> References: <1411498874-9864-1-git-send-email-Liviu.Dudau@arm.com> <1411498874-9864-11-git-send-email-Liviu.Dudau@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1411498874-9864-11-git-send-email-Liviu.Dudau@arm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Liviu Dudau Cc: Bjorn Helgaas , Arnd Bergmann , Rob Herring , Jason Gunthorpe , Benjamin Herrenschmidt , Catalin Marinas , Will Deacon , Russell King , linux-pci , Linus Walleij , Tanmay Inamdar , Grant Likely , Sinan Kaya , Jingoo Han , Kukjin Kim , Suravee Suthikulanit , linux-arch , LKML , Device Tree ML , LAKML Message-ID: <20140924011851.J63jduY17WHM_0dotJ7dugHDNaNo00BFcfYCfjemlhs@z> On Tue, Sep 23, 2014 at 08:01:12PM +0100, Liviu Dudau wrote: > If the firmware has not assigned all the bus resources and > we are not just probing the PCIe busses, it makes sense to > assign the unassigned resources in pci_scan_root_bus(). > > Cc: Bjorn Helgaas > Cc: Arnd Bergmann > Cc: Jason Gunthorpe > Cc: Rob Herring > Signed-off-by: Liviu Dudau > --- > drivers/pci/probe.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > index ef891d2..508cf61 100644 > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -1953,6 +1953,9 @@ struct pci_bus *pci_scan_root_bus(struct device *parent, int bus, > if (!found) > pci_bus_update_busn_res_end(b, max); > > + if (!pci_has_flag(PCI_PROBE_ONLY)) > + pci_assign_unassigned_bus_resources(b); > + > pci_bus_add_devices(b); > return b; > } > -- > 2.1.0 > Bjorn, If you are OK with this patch, can you let me know how do you feel about making pci_scan_root_bus() set up the bus->msi pointer as well? Side note: I don't know exactly how to do it now, but setting bus->msi is needed by platforms that are based on my patches and want to use MSI, otherwise they have to open code pci_scan_root_bus() to set it. I haven't made any attempts to do it in this series as the GICv2m patches are not ready yet, but I can see the need arriving soon. Best regards, Liviu > -- > To unsubscribe from this list: send the line "unsubscribe linux-pci" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- ------------------- .oooO ( ) \ ( Oooo. \_) ( ) ) / (_/ One small step for me ...