Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754169AbaGKQJs (ORCPT ); Fri, 11 Jul 2014 12:09:48 -0400 Received: from fw-tnat.austin.arm.com ([217.140.110.23]:23312 "EHLO collaborate-mta1.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750973AbaGKQJq (ORCPT ); Fri, 11 Jul 2014 12:09:46 -0400 Date: Fri, 11 Jul 2014 17:09:25 +0100 From: Catalin Marinas To: Liviu Dudau Cc: Bjorn Helgaas , linux-pci , Will Deacon , Benjamin Herrenschmidt , Arnd Bergmann , linaro-kernel , Tanmay Inamdar , Grant Likely , Sinan Kaya , Jingoo Han , Kukjin Kim , Suravee Suthikulanit , LKML , Device Tree ML , LAKML Subject: Re: [PATCH v8 6/9] pci: Introduce a domain number for pci_host_bridge. Message-ID: <20140711160925.GD16321@arm.com> References: <1404240214-9804-7-git-send-email-Liviu.Dudau@arm.com> <20140708005954.GC22939@google.com> <20140708104655.GC6501@e106497-lin.cambridge.arm.com> <20140708224847.GC4980@e106497-lin.cambridge.arm.com> <20140710094758.GA6501@e106497-lin.cambridge.arm.com> <20140711141115.GB16321@arm.com> <20140711150823.GU6501@e106497-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140711150823.GU6501@e106497-lin.cambridge.arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 11, 2014 at 04:08:23PM +0100, Liviu Dudau wrote: > On Fri, Jul 11, 2014 at 03:11:16PM +0100, Catalin Marinas wrote: > > On Thu, Jul 10, 2014 at 11:36:10PM +0100, Bjorn Helgaas wrote: > > > Most of the rest of the v7 discussion was about "Introduce a domain > > > number for pci_host_bridge." I think we should add arm64 using the > > > existing pci_scan_root_bus() and keep the domain number in the arm64 > > > sysdata structure like every other arch does. Isn't that feasible? > > > We can worry about domain unification later. > > > > I think that's what we were trying to avoid, adding an arm64-specific > > pci_sys_data structure (and arm64-specific API). IIUC, avoiding this > > would allow the host controller drivers to use the sysdata pointer for > > their own private data structures. > > > > Also since you can specify the domain number via DT (and in Liviu's > > v8 patches read by of_create_pci_host_bridge), I think it would make > > sense to have it stored in some generic data structures (e.g. > > pci_host_bridge) rather than in an arm64 private sysdata. > > > > (Liviu is thinking of an alternative API but maybe he could briefly > > describe it here before posting a new series) > > My plan is to keep the domain number in the pci_host_bridge and split > the creation of the pci_host_bridge out of the pci_create_root_bus(). Wouldn't it make more sense to add domain_nr to the pci_bus structure (well, only needed for the root bus)? It would simplify pci_domain_nr() as well which only takes a pci_bus parameter. > The new function (tentatively called pci_create_new_root_bus()) will > no longer call pci_alloc_host_bridge() but will accept it as a > parameter, allowing one to be able to set the domain_nr ahead of the > root bus creation. If we place domain_nr in pci_bus, this split wouldn't help but we still need your original pci_create_root_bus_in_domain(). Are there other uses of your proposal above? Yet another alternative is to ignore PCI domains altogether (domain 0 always). -- Catalin -- 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/