From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/ttm: Support 52-bit PAs in ttm_place
Date: Sat, 16 May 2026 12:39:00 +1000 [thread overview]
Message-ID: <review-patch1-20260512223154.18089-1-felix.kuehling@amd.com> (raw)
In-Reply-To: <20260512223154.18089-1-felix.kuehling@amd.com>
Patch Review
**Already superseded in drm-next.** The fields have been changed to `uint64_t`, which is the correct fix.
**Type choice concern:** Even if this weren't superseded, `unsigned long` would be the wrong type here. On 32-bit kernels, `unsigned long` is 32 bits — identical to `unsigned` — so the patch would silently provide no benefit on those platforms. The `uint64_t` already in drm-next avoids this problem.
```c
- unsigned fpfn;
- unsigned lpfn;
+ unsigned long fpfn;
+ unsigned long lpfn;
```
**Missing downstream widening:** Note that even with the TTM-level fix (whether this patch or the drm-next version), `struct amdgpu_mem_partition_info` in `amdgpu_gmc.h` still uses `uint32_t` for its `fpfn`/`lpfn`:
```c
struct amdgpu_mem_partition_info {
union {
struct {
uint32_t fpfn;
uint32_t lpfn;
} range;
```
These values feed directly into `places[c].fpfn` at `amdgpu_object.c:123`:
```c
places[c].fpfn = adev->gmc.mem_partitions[mem_id].range.fpfn;
...
places[c].lpfn = adev->gmc.mem_partitions[mem_id].range.lpfn + 1;
```
If the goal is truly 52-bit PA support for AMD GPUs, this downstream struct also needs widening. A follow-up patch addressing `amdgpu_mem_partition_info` would be needed to make the full path consistent.
**No callers updated:** The patch changes the struct definition but doesn't update any callers that may be using `unsigned` or `uint32_t` local variables to hold these values. A grep shows ~31 files touch `fpfn`/`lpfn` across multiple drivers (amdgpu, xe, i915, nouveau, radeon, vmwgfx, qxl, etc.). While many assign literal 0 (safe), some do arithmetic that could be affected by the type change. The patch should have audited these call sites, or at minimum mentioned them in the commit message.
**Verdict:** This patch is redundant with drm-next and uses an inferior type. If the submitter needs 52-bit PA support, they should rebase onto drm-next (which already has the `uint64_t` fix) and submit follow-up patches to widen the AMD-specific structures like `amdgpu_mem_partition_info`.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-16 2:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 22:31 [PATCH] drm/ttm: Support 52-bit PAs in ttm_place Felix Kuehling
2026-05-13 8:08 ` Christian König
2026-05-13 14:15 ` Kuehling, Felix
2026-05-13 15:42 ` Christian König
2026-05-16 2:38 ` Claude review: " Claude Code Review Bot
2026-05-16 2:39 ` Claude Code Review Bot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-05-13 14:12 [PATCH v2] " Felix Kuehling
2026-05-16 1:53 ` Claude review: " Claude Code Review Bot
2026-05-16 1:53 ` Claude Code Review 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=review-patch1-20260512223154.18089-1-felix.kuehling@amd.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/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