Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754271AbbBNTqE (ORCPT ); Sat, 14 Feb 2015 14:46:04 -0500 Received: from service87.mimecast.com ([91.220.42.44]:59683 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754182AbbBNTqB convert rfc822-to-8bit (ORCPT ); Sat, 14 Feb 2015 14:46:01 -0500 Date: Sat, 14 Feb 2015 19:45:52 +0000 From: Lorenzo Pieralisi To: Yijing Wang Cc: Bjorn Helgaas , Jiang Liu , "linux-pci@vger.kernel.org" , Yinghai Lu , "linux-kernel@vger.kernel.org" , Marc Zyngier , "linux-arm-kernel@lists.infradead.org" , Russell King , "x86@kernel.org" , Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , "linux-ia64@vger.kernel.org" , "David S. Miller" , Guan Xuetao , "linux-alpha@vger.kernel.org" , "linux-m68k@vger.kernel.org" , Liviu Dudau , Arnd Bergmann , Geert Uytterhoeven Subject: Re: [PATCH v2 00/30] Refine PCI scan interfaces and make generic pci host bridge Message-ID: <20150214194552.GA3932@e102568-lin.cambridge.arm.com> References: <1421800225-26230-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 In-Reply-To: <1421800225-26230-1-git-send-email-wangyijing@huawei.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginalArrivalTime: 14 Feb 2015 19:45:55.0397 (UTC) FILETIME=[D8D26F50:01D0488E] X-MC-Unique: 115021419455800201 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2562 Lines: 72 Hi Yijing, On Wed, Jan 21, 2015 at 12:29:55AM +0000, Yijing Wang wrote: > v1->v2: > Split pci_host_bridge_list into a new patch, remove .phb_probe_mode > and rework powerpc .phb_of_scan_bus() for simpilicty suggested by > Arnd. Refresh some patch description log, and add a new patch to fix > build warning in ia64. > > This series is based on Bjorn's pci-next branch. > > Patch 1-4 ripped out pci_bus_add_devices() from pci scan interfaces > for better pci scan flow. > > Patch 5-11 make a generic pci_host_bridge to hold pci_host_bridge > related informations, and introduce a pci_host_bridge_ops to > support platform host drivers provide its own pci_host_bridge > related operations to setup pci_host_bridge during pci enumeration. > > Patch 12-28 apply the new pci scan interfaces to platform pci host > bridge drivers. > > Now in kernel, we scan pci bus use the following ways: > 1. pci_scan_bus. > parent = NULL, default io/mem/bus resources > call pci_bus_add_devices() > > 2. pci_scan_bus_parented() + pci_bus_add_devices() > default io/mem/bus resources, only used by xen > > 3. pci_scan_root_bus() + pci_bus_add_devices() > > 4. pci_create_root_bus() + pci_scan_child_bus() + pci_bus_add_devices() > > 5. pci_create_root_bus() + xx_of_scan_bus() + pci_bus_add_devices() > > And we have a lot of arch specific pci_domain_nr() and other platform > specific weak function like pcibios_root_bridge_prepare(). > > After applied this series, we have following scan interfaces: > > 1. pci_scan_bus_legacy() > parent = NULL, default io/mem/bus resources. > for legacy pci scan > > 2. pci_scan_root_bus() > for callers provide its own parent and io/mem/bus resources > but no platform specific pci_host_bridge operations > > 3. pci_scan_root_bridge() > for callers provide its own parent and io/mem/bus resources > and pci_host_bridge_ops. > > Besides, above pci scan interfaces all need addtionally call pci_bus_add_devices() > to set match_driver true and try to attach drivers. > > Also we could eliminate all arch specific pci_domain_nr() after applied this series. > > I tested this series on x86 (with or without ACPI). > Comments and tests are warmly welcome! Can you push a public branch out rebased against mainline for us to pull and test please ? Thanks ! Lorenzo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/