Subject: linux-next: manual merge of the pci tree with Linus' tree

From: Stephen Rothwell <[email-masked]>
Date: Thu, 30 Oct 2025 11:26:10 +1100

Hi all,

Today's linux-next merge of the pci tree got a conflict in:

  drivers/gpu/drm/xe/xe_vram.c

between commit:

  d30203739be7 ("drm/xe: Move rebar to be done earlier")

from Linus' tree and commit:

  4f963693c60b ("drm/xe/vram: Use PCI rebar helpers in resize_vram_bar()")

from the pci tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/xe/xe_vram.c
index 652df7a5f4f6,f18232668810..000000000000
--- a/drivers/gpu/drm/xe/xe_vram.c
+++ b/drivers/gpu/drm/xe/xe_vram.c
@@@ -24,31 -24,8 +24,29 @@@
  #include "xe_vram.h"
  #include "xe_vram_types.h"
  
- #define BAR_SIZE_SHIFT 20
- 
 -static void
 -_resize_bar(struct xe_device *xe, int resno, resource_size_t size)
 +/*
 + * Release all the BARs that could influence/block LMEMBAR resizing, i.e.
 + * assigned IORESOURCE_MEM_64 BARs
 + */
 +static void release_bars(struct pci_dev *pdev)
 +{
 +	struct resource *res;
 +	int i;
 +
 +	pci_dev_for_each_resource(pdev, res, i) {
 +		/* Resource already un-assigned, do not reset it */
 +		if (!res->parent)
 +			continue;
 +
 +		/* No need to release unrelated BARs */
 +		if (!(res->flags & IORESOURCE_MEM_64))
 +			continue;
 +
 +		pci_release_resource(pdev, i);
 +	}
 +}
 +
 +static void resize_bar(struct xe_device *xe, int resno, resource_size_t size)
  {
  	struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
  	int bar_size = pci_rebar_bytes_to_size(size);