From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liviu Dudau Subject: Re: [PATCH v13 10/12] PCI: Assign unassigned bus resources in pci_scan_root_bus() Date: Tue, 30 Sep 2014 09:54:07 +0100 Message-ID: <20140930085407.GL841@e106497-lin.cambridge.arm.com> References: <1412000971-9242-1-git-send-email-Liviu.Dudau@arm.com> <1412000971-9242-11-git-send-email-Liviu.Dudau@arm.com> <1412024521.4285.98.camel@pasglop> <1412029912.4285.110.camel@pasglop> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Content-Disposition: inline Sender: linux-pci-owner@vger.kernel.org To: Bjorn Helgaas Cc: Benjamin Herrenschmidt , Yinghai Lu , Arnd Bergmann , Rob Herring , Jason Gunthorpe , 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 , Jiang Liu List-Id: devicetree@vger.kernel.org On Tue, Sep 30, 2014 at 12:08:49AM +0100, Bjorn Helgaas wrote: > On Mon, Sep 29, 2014 at 4:31 PM, Benjamin Herrenschmidt > wrote: > > On Mon, 2014-09-29 at 15:33 -0600, Bjorn Helgaas wrote: > >> > Right and on powerpc and others as well. We need to survey exist= ing > >> > resources. We also have a number of platform things that might n= eed > >> > to happen before we do the final re-assignment pass. > >> > >> That's true today. But I don't know whether it *has* to be this w= ay > >> forever. On x86, pcibios_resource_survey() throws in E820 informa= tion > >> (which we know long before we do any PCI enumeration) and some IO-= APIC > >> resources (it looks like we also know these before PCI enumeration= ). > >> Powerpc has pcibios_reserve_legacy_regions(), but that looks like > >> mostly stuff that could be done when we find the host bridge, befo= re > >> we enumerate PCI devices below it. > > > > Oh we can probably change that but it's going to be much more work = than > > just moving the assignment into pci_scan_root_bus(). >=20 > Agreed. It's obvious that we can't apply Liviu's patch as-is. Thanks everyone for the feedback! Bjorn, you can drop this patch from the series if you want to add it to your tree, and the host bridge drivers will have to reimplement pci_sca= n_root_bus() for now (most do it already as they need to add msi information as well= ). Benjamin, I still have on my ToDo list to convert powerpc. I might not = be able to do it successfully on my own (as I don't understand a lot of th= e corner cases) but Bjorn is correct here in that pcibios_reserve_legacy_= regions() will move out of the scanning of the root bus. >=20 > > There are also a > > number of subtle and not-so-subtle bits of code that rely on side > > effects of the current code such as anything that tests for bus->ad= ded > > or dev->added. Again, nothing we can't sort out eventually but the > > transition might be a bit painful. > > > > We might need to introduce a new flag for platforms converted to th= e > > "new style" generalized resource assignment which we can deprecate = once > > everybody has moved over. >=20 > There's definitely a lot of work here if we ever want to make this ha= ppen. I know :) Best regards, Liviu >=20 > Bjorn >=20 --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- =C2=AF\_(=E3=83=84)_/=C2=AF