diff options
| author | Ilpo Järvinen <[email protected]> | 2025-04-03 09:31:37 +0000 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2025-04-18 13:23:22 +0000 |
| commit | a34d74877c66ce484ad586d806002ceaedd58657 (patch) | |
| tree | dca171651cd1a5b6651d6de1553b2792a5bac93d /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | Linux 6.15-rc1 (diff) | |
| download | kernel-a34d74877c66ce484ad586d806002ceaedd58657.tar.gz kernel-a34d74877c66ce484ad586d806002ceaedd58657.zip | |
PCI: Restore assigned resources fully after release
PCI resource fitting code in __assign_resources_sorted() runs in multiple
steps. A resource that was successfully assigned may have to be released
before the next step attempts assignment again. The assign+release cycle is
destructive to a start-aligned struct resource (bridge window or IOV
resource) because the start field is overwritten with the real address when
the resource got assigned.
One symptom:
pci 0002:00:00.0: bridge window [mem size 0x00100000]: can't assign; bogus alignment
Properly restore the resource after releasing it. The start, end, and flags
fields must be stored into the related struct pci_dev_resource in order to
be able to restore the resource to its original state.
Fixes: 96336ec70264 ("PCI: Perform reset_resource() and build fail list in sync")
Reported-by: Guenter Roeck <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Reported-by: Nicolas Frattaroli <[email protected]>
Closes: https://lore.kernel.org/r/3578030.5fSG56mABF@workhorse
Signed-off-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Tested-by: Nicolas Frattaroli <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Tested-by: Ondrej Jirman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions
