Re: Question about call to pci_assign_unassigned_bus_resources in amdgpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 24.06.19 um 10:56 schrieb Benjamin Herrenschmidt:
> On Mon, 2019-06-24 at 18:47 +1000, Benjamin Herrenschmidt wrote:
>> On Mon, 2019-06-24 at 08:42 +0000, Koenig, Christian wrote:
>>> Then we resize the VRAM BAR by calling pci_resize_resource(). That in
>>> turn tries to resize and shuffle around the parent bridge resources
>>> using pci_reassign_bridge_resources().
>>>
>>> But pci_reassign_bridge_resources() does not assign any device
>>> resources, it just tries to make sure the upstream bridges have enough
>>> space to fit everything in.
> Hrm... are you sure of this ? Maybe it has changed... or I'm missing
> something. Because right in the middle of it I see:
>
>
>   	__pci_bus_size_bridges(bridge->subordinate, &added);
> 	__pci_bridge_assign_resources(bridge, &added, &failed);
>
> Now the second of these will call __pci_bus_assign_resources() on the
> bridge->subordinate, which will recursively assign all devices below
> the bridge.
>
> Or am I overlooking something ?

It is perfectly possible that this changed later in the patch set. We 
had something like 4 or 5 iterations until everything settled.

> It could be that if it fails, then you need to restore your device
> resources indeed... but the normal case should work from my reading of
> the code.

Yeah, it is definitely still necessary for error handling.

Regards,
Christian.

>
> Cheers,
> Ben.
>





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux