public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Felix Kuehling <felix.kuehling@amd.com>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: christian.koenig@amd.com
Subject: Re: [PATCH v2] drm/ttm: Support 52-bit PAs in ttm_place
Date: Wed, 13 May 2026 15:50:18 +0100	[thread overview]
Message-ID: <a059d1e9-e356-41b0-8336-8b25ea24e7e1@ursulin.net> (raw)
In-Reply-To: <20260513141253.20410-1-felix.kuehling@amd.com>


On 13/05/2026 15:12, Felix Kuehling wrote:
> fpfn and lpfn in struct ttm_place are 32-bit page numbers. With 4KB page
> size this can support up to 44-bit physical addressing. Grow these to
> unsigned long to support larger physical addresses.
> 
> Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
> ---
>   include/drm/ttm/ttm_placement.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/drm/ttm/ttm_placement.h b/include/drm/ttm/ttm_placement.h
> index b510a4812609..ab2639e42c54 100644
> --- a/include/drm/ttm/ttm_placement.h
> +++ b/include/drm/ttm/ttm_placement.h
> @@ -81,8 +81,8 @@
>    * Structure indicating a possible place to put an object.
>    */
>   struct ttm_place {
> -	unsigned	fpfn;
> -	unsigned	lpfn;
> +	uint64_t	fpfn;
> +	uint64_t	lpfn;
>   	uint32_t	mem_type;
>   	uint32_t	flags;
>   };

Maybe audit of usage sites is required to make sure no compiler warnings 
on 32-bit builds if nothing else. Things like:

amdgpu_vram_mgr_intersects()
...
		if (place->fpfn < lpfn &&
		    (!place->lpfn || place->lpfn > fpfn))
			return true;

Etc. Probably are all best adjusted to match the new type.

There is also:

struct ttm_resource {
	unsigned long start;

Which also may need aligning. I know no one cares about 32-bit builds 
but some automated systems will probably test it and send reports.

Regards,

Tvrtko


  parent reply	other threads:[~2026-05-13 14:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 14:12 [PATCH v2] drm/ttm: Support 52-bit PAs in ttm_place Felix Kuehling
2026-05-13 14:19 ` Christian König
2026-05-13 14:27   ` Kuehling, Felix
2026-05-13 14:50     ` Arunpravin Paneer Selvam
2026-05-13 14:50 ` Tvrtko Ursulin [this message]
2026-05-13 15:32   ` Christian König
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=a059d1e9-e356-41b0-8336-8b25ea24e7e1@ursulin.net \
    --to=tursulin@ursulin.net \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=felix.kuehling@amd.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