Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: sashiko-reviews@lists.linux.dev,
	Bjorn Helgaas <helgaas@kernel.org>,
	"Deucher, Alexander" <alexander.deucher@amd.com>
Cc: dri-devel@lists.freedesktop.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH] drm/amdgpu: Gate VFCT bus fallback on pci=realloc
Date: Thu, 15 Oct 2026 07:58:20 -0500	[thread overview]
Message-ID: <161936bd-943d-4092-a148-cfdaec6d83c0@amd.com> (raw)
In-Reply-To: <sashiko-outbox-172875@kernel.org>



On 10/15/26 07:56, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] pci: missing EXPORT_SYMBOL for pci_realloc_enabled_by_user() breaks amdgpu
> --
> 
> commit 9eeda1e99dc9a34bbbe5670a252bc894b1208696
> Author: Mario Limonciello <mario.limonciello@amd.com>
> 
> drm/amdgpu: Gate VFCT bus fallback on pci=realloc
> 
> This patch modifies the soft filter system to gate the VFCT bus fallback
> so it only runs when pci=realloc is explicitly requested by the user. It
> introduces pci_realloc_enabled_by_user() in the PCI core and uses it in
> the AMDGPU driver.
> 
> Closes: https://lore.kernel.org/amd-gfx/20261014080523.186533-1-rezanikzadch@gmail.com/
> 
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
>> index f9315e0472fe9..9651260278c18 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
> [ ... ]
>> @@ -459,7 +457,10 @@ static int amdgpu_acpi_vfct_match(struct amdgpu_device *adev,
>>   	if (vhdr->PCIBus == adev->pdev->bus->number)
>>   		return 0;
>>   
>> -	/* Bus mismatch but device identity matches (PCI renumbering case) */
>> +	/* Allow bus renumbering only when the user requested pci=realloc. */
>> +	if (!pci_realloc_enabled_by_user())
>> +		return -ENODEV;
>> +
> 
> [ ... ]
> 
>> diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
>> index ed16ef7c26fa7..d9450585082c0 100644
>> --- a/drivers/pci/setup-bus.c
>> +++ b/drivers/pci/setup-bus.c
>> @@ -1799,6 +1799,11 @@ static bool pci_realloc_enabled(enum enable_type enable)
>>   	return enable >= user_enabled;
>>   }
>>   
>> +bool pci_realloc_enabled_by_user(void)
>> +{
>> +	return pci_realloc_enable == user_enabled;
>> +}
>> +
> 
> [Severity: Low]
> Will this cause a module build failure (undefined reference) if the amdgpu
> driver is compiled as a loadable module (CONFIG_DRM_AMDGPU=m)?
> 
> Since setup-bus.c is built into the core kernel and pci_realloc_enabled_by_user()
> lacks an EXPORT_SYMBOL or EXPORT_SYMBOL_GPL macro, the linker won't be able
> to resolve this symbol during modpost for amdgpu.ko.
> 

Yeah; this is a valid issue.  If we're aligned directionally on this 
I'll fix that in a v2.

  reply	other threads:[~2026-10-15 12:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 12:48 [PATCH] drm/amdgpu: Gate VFCT bus fallback on pci=realloc Mario Limonciello
2026-10-15 12:56 ` sashiko-bot
2026-10-15 12:58   ` Mario Limonciello [this message]
2026-10-15 19:48 ` Bjorn Helgaas
2026-10-15 20:25   ` Mario Limonciello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=161936bd-943d-4092-a148-cfdaec6d83c0@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox