From: sashiko-bot@kernel.org
To: "Lancelot SIX" <lancelot.six@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v4] drm/amdkfd: Add CWSR trap handler for GFX13
Date: Thu, 26 Nov 2026 20:50:00 +0000 [thread overview]
Message-ID: <sashiko-outbox-236166@kernel.org> (raw)
In-Reply-To: <20261126203011.295945-1-lancelot.six@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/amdkfd: unused cwsr_trap_gfx13_hex triggers
-Wunused-const-variable
--
commit 2e64101d36eee8890b942dff02c7d421f5a71ffe
Author: Lancelot SIX <lancelot.six@amd.com>
drm/amdkfd: Add CWSR trap handler for GFX13
This commit adds the GFX13 CWSR trap handler assembly source and its
compiled hex array in cwsr_trap_handler.h.
> diff --git a/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h b/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h
> index 5d468460f532c..82f75bcf31842 100644
> --- a/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h
> +++ b/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h
> @@ -5994,3 +5994,573 @@ static const uint32_t cwsr_trap_gfx12_1_0_rev_1_hex[] = {
> 0xbf9f0000, 0xbf9f0000,
> 0xbf9f0000, 0xbf9f0000,
> };
> +
> +static const uint32_t cwsr_trap_gfx13_hex[] = {
[Severity: High]
Does defining cwsr_trap_gfx13_hex without referencing it in
kfd_cwsr_init() trigger a -Wunused-const-variable warning when building
kfd_device.c?
drivers/gpu/drm/Makefile unconditionally enables -Wunused-const-variable,
and cwsr_trap_handler.h is only included by kfd_device.c, where
kfd_cwsr_init() has no branch selecting cwsr_trap_gfx13_hex:
drivers/gpu/drm/amd/amdkfd/kfd_device.c:kfd_cwsr_init() {
...
} else if (KFD_GC_VERSION(kfd) == IP_VERSION(12, 1, 0) &&
(kfd->adev->rev_id & 0xF) == 0) {
BUILD_BUG_ON(sizeof(cwsr_trap_gfx12_1_0_rev_0_hex)
> KFD_CWSR_TMA_OFFSET);
kfd->cwsr_isa = cwsr_trap_gfx12_1_0_rev_0_hex;
kfd->cwsr_isa_size = sizeof(cwsr_trap_gfx12_1_0_rev_0_hex);
} else {
BUILD_BUG_ON(sizeof(cwsr_trap_gfx12_1_0_rev_1_hex)
> KFD_CWSR_TMA_OFFSET);
kfd->cwsr_isa = cwsr_trap_gfx12_1_0_rev_1_hex;
kfd->cwsr_isa_size = sizeof(cwsr_trap_gfx12_1_0_rev_1_hex);
}
}
With CONFIG_WERROR, CONFIG_DRM_WERROR, or CONFIG_DRM_AMDGPU_WERROR
enabled, this breaks the build, and GFX13 devices will fall through to
cwsr_trap_gfx12_1_0_rev_1_hex unless wired up in kfd_cwsr_init() (or
marked __maybe_unused if wired up in a later patch).
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126203011.295945-1-lancelot.six@amd.com?part=1
next prev parent reply other threads:[~2026-11-26 20:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 20:30 [PATCH v4] drm/amdkfd: Add CWSR trap handler for GFX13 Lancelot SIX
2026-11-26 20:50 ` sashiko-bot [this message]
2026-11-30 16:27 ` Deucher, Alexander
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-236166@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=lancelot.six@amd.com \
--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.