linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	<nouveau@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>,
	<rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: gpu: nova-core: arm32 build errors
Date: Thu, 28 Aug 2025 23:27:51 +0200	[thread overview]
Message-ID: <DCEDOBPT4VLP.R2K3EWY871F1@kernel.org> (raw)
In-Reply-To: <DCEBRUJ383TE.R6W8YCRNZP1O@kernel.org>

On Thu Aug 28, 2025 at 9:58 PM CEST, Danilo Krummrich wrote:
> On Thu Aug 28, 2025 at 9:36 PM CEST, Miguel Ojeda wrote:
>> On Thu, Aug 28, 2025 at 9:31 PM Miguel Ojeda
>> <miguel.ojeda.sandonis@gmail.com> wrote:
>>>
>>> and a `DmaAddress`
>>> newtype, not just a typedef, could perhaps be nice anyway?
>>
>> The one from your linked patch is not a newtype though, so I guess
>> there is a reason for that.
>
> No specific reason, I didn't see a lot of value in a newtype in the first
> place, depending on you answer in the other thread, may we just found some
> value. :)

To expand a bit, the typdef is also for simplicity. Eventually, drivers will do
some arithmetic on the DMA address, etc.

So, if we have a new type, we'd probably want to provide methods for doing the
most common arithmetic operations, because we don't want to convert to/from the
corresponding primitive type all the time.

At the same time we could take this further and also provide a DmaRange type,
which also considers the size for those operations.

DmaRange is actually something that I had in mind to implement subsequently,
because I'm not too happy with CoherentAllocation::dma_handle_with_offset(),
it's just too specific and insufficient.

Given that, I thought there's not that much value in making DmaAddress a new
type. (Mybe saying "no specific reason" was a slight understatement. :)

So, if the idea was to have from/to helpers, we can also do them on DmaRange.

However, given that also the above only helps in a limited way for the cases
discussed in the other thread, I feel like the best option might still be to
depend on 64-bit for Nova.

  reply	other threads:[~2025-08-28 21:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28 16:02 gpu: nova-core: arm32 build errors Miguel Ojeda
2025-08-28 17:54 ` Danilo Krummrich
2025-08-28 19:24   ` Danilo Krummrich
2025-08-28 19:31     ` Miguel Ojeda
2025-08-28 19:36       ` Miguel Ojeda
2025-08-28 19:58         ` Danilo Krummrich
2025-08-28 21:27           ` Danilo Krummrich [this message]
2025-08-28 19:57       ` Danilo Krummrich
2025-08-28 21:45       ` John Hubbard
2025-08-28 21:54         ` Danilo Krummrich

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=DCEDOBPT4VLP.R2K3EWY871F1@kernel.org \
    --to=dakr@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    /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;
as well as URLs for NNTP newsgroup(s).