[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAErSpo4anYBmaRbJEFE9kAXSmnvfqud=w1QA=mSSsTUamM4kSw@mail.gmail.com>
Date: Tue, 8 Apr 2014 10:28:39 -0600
From: Bjorn Helgaas <bhelgaas@...gle.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
linux-pci <linux-pci@...r.kernel.org>,
Catalin Marinas <Catalin.Marinas@....com>,
Will Deacon <Will.Deacon@....com>,
linaro-kernel <linaro-kernel@...ts.linaro.org>,
Arnd Bergmann <arnd@...db.de>,
LKML <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
LAKML <linux-arm-kernel@...ts.infradead.org>,
Tanmay Inamdar <tinamdar@....com>,
Grant Likely <grant.likely@...retlab.ca>
Subject: Re: [PATCH v7 4/6] pci: Introduce a domain number for pci_host_bridge.
On Tue, Apr 8, 2014 at 4:20 AM, Liviu Dudau <Liviu.Dudau@....com> wrote:
> On Mon, Apr 07, 2014 at 11:44:51PM +0100, Bjorn Helgaas wrote:
>> Let me try to explain my concern about the
>> pci_create_root_bus_in_domain() interface. We currently have these
>> interfaces:
>>
>> pci_scan_root_bus()
>> pci_scan_bus()
>> pci_scan_bus_parented()
>> pci_create_root_bus()
>> ...
>> One alternative is to add an _in_domain() variant of each of these
>> interfaces, but that doesn't seem very convenient either. My idea of
>> passing in a structure would also require adding variants, so there's
>> not really an advantage there, but I am thinking of the next
>> unification effort, e.g., for NUMA node info. I don't really want to
>> have to change all the _in_domain() interfaces to also take yet
>> another parameter for the node number.
>
> OK, what about this: all the functions that you have mentioned take a
> void *sysdata parameter. Should we convert this opaque pointer into a
> specific structure that holds the domain_nr and (in future) the NUMA
> node info?
I doubt if we can make sysdata itself generic because I suspect we
need a way to have *some* arch-specific data. But maybe the arch
could supply a structure containing a struct device *, domain, struct
pci_ops *, list of resources, aperture info, etc. I wonder if struct
pci_host_bridge would be a reasonable place to put this stuff, e.g.,
something like this:
struct pci_host_bridge {
int domain;
int node;
struct device *dev;
struct pci_ops *ops;
struct list_head resources;
void *sysdata;
struct pci_bus *bus; /* filled in by core, not by arch */
... /* other existing contents managed by core */
};
struct pci_bus *pci_scan_host_bridge(struct pci_host_bridge *bridge);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists