From: sashiko-bot@kernel.org
To: "Zhigang Luo" <Zhigang.Luo@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/7] Revert "drm/amdgpu: take the A+A VF GMC aperture from SRAT"
Date: Fri, 13 Nov 2026 15:20:47 +0000 [thread overview]
Message-ID: <sashiko-outbox-213075@kernel.org> (raw)
In-Reply-To: <20261113145702.323968-3-Zhigang.Luo@amd.com>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] drm/amdgpu: undefined guard in
amdgpu_acpi_find_gpu_memory_in_srat() [1]
--
commit d687d56267f159cb114f4a53091a5e9a32dc7973
Author: Zhigang Luo <Zhigang.Luo@amd.com>
Revert "drm/amdgpu: take the A+A VF GMC aperture from SRAT"
This commit reverts the direct SRAT aperture lookup in gmc_v12_0_early_init()
and the SPM overrides in gmc_v12_0_vram_gtt_location(), gmc_v12_0_mc_init(),
and mmhub_v4_2_0_get_xgmi_info() so that the GMC aperture is derived from the
FB offset and XGMI node segment size instead.
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
> index cd276a138e101..7e0b83b1015fc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
> @@ -639,7 +639,6 @@ static void gmc_v12_0_set_gfxhub_funcs(struct amdgpu_device *adev)
> static int gmc_v12_0_early_init(struct amdgpu_ip_block *ip_block)
> {
> struct amdgpu_device *adev = ip_block->adev;
> - int r;
>
> if (adev->smuio.funcs &&
> adev->smuio.funcs->is_host_gpu_xgmi_supported)
> @@ -662,18 +661,6 @@ static int gmc_v12_0_early_init(struct amdgpu_ip_block *ip_block)
> gmc_v12_0_set_mmhub_funcs(adev);
> gmc_v12_0_set_umc_funcs(adev);
>
> - if (amdgpu_virt_vram_is_spm(adev)) {
> - u64 aper_base, aper_size;
> -
> - r = amdgpu_acpi_find_gpu_memory_in_srat(adev, &aper_base,
> - &aper_size);
> - if (r)
> - return r;
> -
> - adev->gmc.aper_base = aper_base;
> - adev->gmc.aper_size = aper_size;
> - }
[Severity: High]
This problem wasn't introduced by this patch, but does
amdgpu_acpi_find_gpu_memory_in_srat() [1] always return -ENOENT?
In drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c, the SRAT lookup implementation
is guarded by #ifdef HAVE_ACPI_SRAT_GENERIC_AFFINITY, an out-of-tree autoconf
macro that is never defined in the kernel tree even though struct
acpi_srat_generic_affinity is unconditionally defined in
include/acpi/actbl3.h. Only the #else fallback stub is compiled, causing
SRAT lookups for SPM-backed VRAM to fail with -ENOENT during device probe.
[1] https://sashiko.dev/#/bug/linux-e20f9f1a-d616-45e0-9734-058df15f4c59
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261113145702.323968-1-Zhigang.Luo@amd.com?part=3
next prev parent reply other threads:[~2026-11-13 15:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 14:56 [PATCH 1/7] Revert "drm/amdgpu: mark A+A VF VRAM mappings as system memory" Zhigang Luo
2026-11-13 14:56 ` [PATCH 2/7] Revert "drm/amdkfd: mark A+A VF VRAM PTEs " Zhigang Luo
2026-11-13 15:16 ` sashiko-bot
2026-11-13 14:56 ` [PATCH 3/7] Revert "drm/amdgpu: take the A+A VF GMC aperture from SRAT" Zhigang Luo
2026-11-13 15:20 ` sashiko-bot [this message]
2026-11-13 14:56 ` [PATCH 4/7] drm/amdgpu: set the A+A VF SYSTEM bit in the GFX 12.1 helpers Zhigang Luo
2026-11-13 15:20 ` sashiko-bot
2026-11-13 14:57 ` [PATCH 5/7] drm/amdgpu: fill the A+A VF PDB0 through get_vm_pde Zhigang Luo
2026-11-13 15:14 ` sashiko-bot
2026-11-13 14:57 ` [PATCH 6/7] drm/amdgpu: align the sysvm GART start to 8GB Zhigang Luo
2026-11-13 15:05 ` sashiko-bot
2026-11-13 14:57 ` [PATCH 7/7] drm/amdgpu: keep the A+A VF VRAM base at the SRAT address Zhigang Luo
2026-11-13 15:11 ` [PATCH 1/7] Revert "drm/amdgpu: mark A+A VF VRAM mappings as system memory" sashiko-bot
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=sashiko-outbox-213075@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Zhigang.Luo@amd.com \
--cc=amd-gfx@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.