Re: [PATCH 3/3] PCI: Set pref for mem64 resource of pcie device

From: Yinghai Lu
Date: Fri Apr 10 2015 - 00:13:11 EST


On Thu, Apr 9, 2015 at 4:31 PM, Benjamin Herrenschmidt
<benh@xxxxxxxxxxxxxxxxxxx> 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)
break;
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/