* [PATCH 1/3] PCI/sysfs: Remove resource assignment after BAR resize
2026-11-09 13:10 [PATCH 0/3] PCI: remove redundant resource assignments done after BAR resize Ilpo Järvinen
@ 2026-11-09 13:10 ` Ilpo Järvinen
2026-11-09 13:10 ` [PATCH 2/3] drm/xe: Remove driver side " Ilpo Järvinen
2026-11-09 13:10 ` [PATCH 3/3] drm/i915: " Ilpo Järvinen
2 siblings, 0 replies; 4+ messages in thread
From: Ilpo Järvinen @ 2026-11-09 13:10 UTC (permalink / raw)
To: Bjorn Helgaas, linux-pci, linux-kernel, Matthew Brost,
Thomas Hellström, Rodrigo Vivi, David Airlie, Simona Vetter,
intel-xe, dri-devel, Jani Nikula, Joonas Lahtinen
Cc: Ilpo Järvinen
pci_resize_resource() assigns the resized BAR and the other BARs it
released, or restores the original configuration on failure. Calling
pci_assign_unassigned_bus_resources() after it is redundant. If that
call manages to assign more resources in some scenario, the problem
should be fixed inside pci_resize_resource() instead.
Remove the pci_assign_unassigned_bus_resources() call from
__resource_resize_store().
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/pci/pci-sysfs.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 6669e9ad5bd3..bccd0bd5091b 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -1731,7 +1731,6 @@ static ssize_t __resource_resize_store(struct device *dev, int n,
const char *buf, size_t count)
{
struct pci_dev *pdev = to_pci_dev(dev);
- struct pci_bus *bus = pdev->bus;
unsigned long size;
int ret;
u16 cmd;
@@ -1768,8 +1767,6 @@ static ssize_t __resource_resize_store(struct device *dev, int n,
pci_warn(pdev, "Failed to resize BAR %d: %pe\n",
n, ERR_PTR(ret));
- pci_assign_unassigned_bus_resources(bus);
-
if (sysfs_create_groups(&pdev->dev.kobj, pci_dev_resource_attr_groups))
pci_warn(pdev, "Failed to recreate resource groups after BAR resizing\n");
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/3] drm/xe: Remove driver side resource assignment after BAR resize
2026-11-09 13:10 [PATCH 0/3] PCI: remove redundant resource assignments done after BAR resize Ilpo Järvinen
2026-11-09 13:10 ` [PATCH 1/3] PCI/sysfs: Remove resource assignment " Ilpo Järvinen
@ 2026-11-09 13:10 ` Ilpo Järvinen
2026-11-09 13:10 ` [PATCH 3/3] drm/i915: " Ilpo Järvinen
2 siblings, 0 replies; 4+ messages in thread
From: Ilpo Järvinen @ 2026-11-09 13:10 UTC (permalink / raw)
To: Bjorn Helgaas, linux-pci, linux-kernel, Matthew Brost,
Thomas Hellström, Rodrigo Vivi, David Airlie, Simona Vetter,
intel-xe, dri-devel, Jani Nikula, Joonas Lahtinen
Cc: Ilpo Järvinen
pci_resize_resource() assigns the resized BAR and the other BARs it
released, or restores the original configuration on failure. Calling
pci_assign_unassigned_bus_resources() after it is redundant. If that
call manages to assign more resources in some scenario, the problem
should be fixed inside pci_resize_resource() instead.
Remove the pci_assign_unassigned_bus_resources() call from
xe_pci_rebar_resize().
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/gpu/drm/xe/xe_pci_rebar.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_pci_rebar.c b/drivers/gpu/drm/xe/xe_pci_rebar.c
index 7e2c7079b6ff..f47b3c039abd 100644
--- a/drivers/gpu/drm/xe/xe_pci_rebar.c
+++ b/drivers/gpu/drm/xe/xe_pci_rebar.c
@@ -100,7 +100,5 @@ void xe_pci_rebar_resize(struct xe_device *xe)
pci_write_config_dword(pdev, PCI_COMMAND, pci_cmd & ~PCI_COMMAND_MEMORY);
resize_bar(xe, LMEM_BAR, rebar_size);
-
- pci_assign_unassigned_bus_resources(pdev->bus);
pci_write_config_dword(pdev, PCI_COMMAND, pci_cmd);
}
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/3] drm/i915: Remove driver side resource assignment after BAR resize
2026-11-09 13:10 [PATCH 0/3] PCI: remove redundant resource assignments done after BAR resize Ilpo Järvinen
2026-11-09 13:10 ` [PATCH 1/3] PCI/sysfs: Remove resource assignment " Ilpo Järvinen
2026-11-09 13:10 ` [PATCH 2/3] drm/xe: Remove driver side " Ilpo Järvinen
@ 2026-11-09 13:10 ` Ilpo Järvinen
2 siblings, 0 replies; 4+ messages in thread
From: Ilpo Järvinen @ 2026-11-09 13:10 UTC (permalink / raw)
To: Bjorn Helgaas, linux-pci, linux-kernel, Matthew Brost,
Thomas Hellström, Rodrigo Vivi, David Airlie, Simona Vetter,
intel-xe, dri-devel, Jani Nikula, Joonas Lahtinen,
Tvrtko Ursulin, intel-gfx
Cc: Ilpo Järvinen
pci_resize_resource() assigns the resized BAR and the other BARs it
released, or restores the original configuration on failure. Calling
pci_assign_unassigned_bus_resources() after it is redundant. If that
call manages to assign more resources in some scenario, the problem
should be fixed inside pci_resize_resource() instead.
Remove the pci_assign_unassigned_bus_resources() call from
i915_resize_lmem_bar().
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/gpu/drm/i915/gt/intel_region_lmem.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_region_lmem.c b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
index b8a39567a334..d6f5e340657c 100644
--- a/drivers/gpu/drm/i915/gt/intel_region_lmem.c
+++ b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
@@ -104,7 +104,6 @@ static void i915_resize_lmem_bar(struct drm_i915_private *i915, resource_size_t
_resize_bar(i915, GEN12_LMEM_BAR, rebar_size);
- pci_assign_unassigned_bus_resources(pdev->bus);
pci_write_config_dword(pdev, PCI_COMMAND, pci_cmd);
intel_uncore_forcewake_put(&i915->uncore, FORCEWAKE_ALL);
}
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread