From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260512223154.18089-1-felix.kuehling@amd.com> References: <20260512223154.18089-1-felix.kuehling@amd.com> <20260512223154.18089-1-felix.kuehling@amd.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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` w= ould be the wrong type here. On 32-bit kernels, `unsigned long` is 32 bits = =E2=80=94 identical to `unsigned` =E2=80=94 so the patch would silently pro= vide no benefit on those platforms. The `uint64_t` already in drm-next avoi= ds this problem. ```c - unsigned fpfn; - unsigned lpfn; + unsigned long fpfn; + unsigned long lpfn; ``` **Missing downstream widening:** Note that even with the TTM-level fix (whe= ther 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 =3D adev->gmc.mem_partitions[mem_id].range.fpfn; ... places[c].lpfn =3D 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_in= fo` 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 variab= les to hold these values. A grep shows ~31 files touch `fpfn`/`lpfn` across= multiple drivers (amdgpu, xe, i915, nouveau, radeon, vmwgfx, qxl, etc.). W= hile many assign literal 0 (safe), some do arithmetic that could be affecte= d 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 typ= e. If the submitter needs 52-bit PA support, they should rebase onto drm-ne= xt (which already has the `uint64_t` fix) and submit follow-up patches to w= iden the AMD-specific structures like `amdgpu_mem_partition_info`. --- Generated by Claude Code Patch Reviewer