[lkml]   [2015]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/3] PCI: Set pref for mem64 resource of pcie device
On Thu, Apr 9, 2015 at 4:31 PM, Benjamin Herrenschmidt
<> wrote:
>> should we make
>> int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
>> to
>> int pci_bus_alloc_resource(struct pci_bus *bus, struct pci_dev *dev,
>> struct resource *res,
> Do you need to pass bus if you have dev ?

in following path:

_pci_assign_resource only take dev, and it will go up for parent bus

while ((ret = __pci_assign_resource(bus, dev, resno, size,
min_align, fit))) {
if (!bus->parent || !bus->self->transparent)
bus = bus->parent;

and __pci_assign_resource will call pci_bus_alloc_resource.

so it is could go up several levels to use upper bus there.

 \ /
  Last update: 2015-04-10 06:42    [W:0.105 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site