From: "Danilo Krummrich" <dakr@kernel.org>
To: "Alexandre Courbot" <acourbot@nvidia.com>
Cc: <aliceryhl@google.com>, <abdiel.janulgue@gmail.com>,
<daniel.almeida@collabora.com>, <robin.murphy@arm.com>,
<a.hindborg@kernel.org>, <ojeda@kernel.org>, <boqun@kernel.org>,
<gary@garyguo.net>, <bjorn3_gh@protonmail.com>,
<lossin@kernel.org>, <tmgross@umich.edu>, <tamird@kernel.org>,
<work@onurozkan.dev>, <driver-core@lists.linux.dev>,
<nova-gpu@lists.linux.dev>, <dri-devel@lists.freedesktop.org>,
<linux-kernel@vger.kernel.org>, <rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH 1/2] rust: scatterlist: tie owned tables to the device's bound lifetime
Date: Mon, 16 Nov 2026 13:43:31 +0100 [thread overview]
Message-ID: <DMWN7AJF6SXX.1HN3UMDROET7F@kernel.org> (raw)
In-Reply-To: <DMWC45NN5L9I.2NUG81ETBC84L@nvidia.com>
On Mon Nov 16, 2026 at 5:02 AM CET, Alexandre Courbot wrote:
>> @@ -81,7 +78,7 @@ pub(crate) fn new(
>> let mut level0 = CoherentBox::<'_, [u64]>::zeroed_slice(
>> dev,
>> GSP_PAGE_SIZE / size_of::<u64>(),
>> - GFP_KERNEL
>> + GFP_KERNEL,
>
> Stray hunk? Maybe we can move it to patch 2 since it reformats that part
> anyway.
I noticed this before sending too, but for some odd reason rustfmt insists on
this with this change.
When I noticed I was 'whatever', but now I got curious. It happens when
level2 <- {
build_lvl(&data)
.map(|l2| SGTable::new(dev, l2, DataDirection::ToDevice, GFP_KERNEL))?
},
is changed to
level2: {
let l2 = build_lvl(data)?;
SGTable::new(dev, l2, DataDirection::ToDevice, GFP_KERNEL)?
},
>> @@ -308,38 +283,27 @@ fn drop(&mut self) {
>> ///
>> /// - The backing memory pages.
>> /// - The `struct sg_table` allocation (`sgt`).
>
> `sgt` is removed by this patch.
Good catch, I will remove this and the other one.
> <...>
>> diff --git a/samples/rust/rust_dma.rs b/samples/rust/rust_dma.rs
>> index ffb693544673..844e137cddc8 100644
>> --- a/samples/rust/rust_dma.rs
>> +++ b/samples/rust/rust_dma.rs
>> @@ -35,8 +35,7 @@
>> struct DmaSampleData<'bound> {
>> pdev: &'bound pci::Device<Bound>,
>> ca: Coherent<'bound, [MyStruct]>,
>> - #[pin]
>> - sgt: SGTable<Owned<VVec<u8>>>,
>> + sgt: SGTable<Owned<'bound, VVec<u8>>>,
>
> Since there is no more `pin` in `DmaSampleData`, can we also remove its
> `pinned_drop` attribute?
Yes, I left it as is intentionally though as this patch is purely a mechanical
conversion. I can send another one, analogous to the nova-core one.
next prev parent reply other threads:[~2026-11-16 12:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 23:42 [PATCH 1/2] rust: scatterlist: tie owned tables to the device's bound lifetime Danilo Krummrich
2026-11-14 23:42 ` [PATCH 2/2] gpu: nova-core: remove unnecessary firmware pin-init Danilo Krummrich
2026-11-16 4:02 ` Alexandre Courbot
2026-11-16 12:29 ` Danilo Krummrich
2026-11-16 13:57 ` Alexandre Courbot
2026-11-16 4:02 ` [PATCH 1/2] rust: scatterlist: tie owned tables to the device's bound lifetime Alexandre Courbot
2026-11-16 12:43 ` Danilo Krummrich [this message]
2026-11-16 12:49 ` Gary Guo
2026-11-16 13:16 ` 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=DMWN7AJF6SXX.1HN3UMDROET7F@kernel.org \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=abdiel.janulgue@gmail.com \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=driver-core@lists.linux.dev \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=ojeda@kernel.org \
--cc=robin.murphy@arm.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.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.