From: "Danilo Krummrich" <dakr@kernel.org>
To: "Timur Tabi" <ttabi@nvidia.com>
Cc: "Luis Chamberlain" <mcgrof@kernel.org>,
"Russ Weight" <russ.weight@linux.dev>,
"Miguel Ojeda" <ojeda@kernel.org>, <driver-core@lists.linux.dev>,
<rust-for-linux@vger.kernel.org>, <nova-gpu@lists.linux.dev>,
"Gary Guo" <gary@garyguo.net>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Eliot Courtney" <ecourtney@nvidia.com>,
"John Hubbard" <jhubbard@nvidia.com>,
"Zhi Wang" <zhiw@nvidia.com>
Subject: Re: [PATCH v4 4/7] gpu: nova-core: transition gsp to TLV images
Date: Fri, 10 Jul 2026 01:21:40 +0200 [thread overview]
Message-ID: <DJUFD2VMD5T0.1279IQJEATG1B@kernel.org> (raw)
In-Reply-To: <20260709213915.520109-5-ttabi@nvidia.com>
On Thu Jul 9, 2026 at 11:39 PM CEST, Timur Tabi wrote:
> + let mut fw_vvec = VVec::from_elem(0u8, size, GFP_KERNEL).map_err(|_| ENOMEM)?;
Can you please add a patch introducing Vec::zeroed() instead that uses
__GFP_ZEROED, analogous to Box::zeroed()? I.e. something like this:
pub fn zeroed(n: usize, flags: Flags) -> Result<Self, AllocError>
where
T: Zeroable,
{
let mut v = Self::with_capacity(n, flags | __GFP_ZERO)?;
// SAFETY:
// - `n <= capacity - len`: `with_capacity(n)` guarantees capacity >= n, len is 0.
// - All elements in `[0, n)` are initialized: `__GFP_ZERO` zeroes the allocation,
// and `T: Zeroable` guarantees all-zeroes is a valid bit pattern.
unsafe { v.inc_len(n) };
Ok(v)
}
next prev parent reply other threads:[~2026-07-09 23:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 21:39 [PATCH v4 0/7] Transition Nova Core to TLV firmare images Timur Tabi
2026-07-09 21:39 ` [PATCH v4 1/7] rust: firmware: add request_into_buf() Timur Tabi
2026-07-09 22:46 ` Timur Tabi
2026-07-09 23:02 ` Danilo Krummrich
2026-07-09 21:39 ` [PATCH v4 2/7] gpu: nova-core: add TLV parser for firmware files Timur Tabi
2026-07-09 21:39 ` [PATCH v4 3/7] gpu: nova-core: transition booter_load to TLV images Timur Tabi
2026-07-09 21:39 ` [PATCH v4 4/7] gpu: nova-core: transition gsp " Timur Tabi
2026-07-09 23:21 ` Danilo Krummrich [this message]
2026-07-09 21:39 ` [PATCH v4 5/7] gpu: nova-core: transition gen_bootloader " Timur Tabi
2026-07-09 21:39 ` [PATCH v4 6/7] gpu: nova-core: transition fsp " Timur Tabi
2026-07-09 21:39 ` [PATCH v4 7/7] gpu: nova-core: update firmware module info for " Timur Tabi
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=DJUFD2VMD5T0.1279IQJEATG1B@kernel.org \
--to=dakr@kernel.org \
--cc=acourbot@nvidia.com \
--cc=driver-core@lists.linux.dev \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=mcgrof@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=ojeda@kernel.org \
--cc=russ.weight@linux.dev \
--cc=rust-for-linux@vger.kernel.org \
--cc=ttabi@nvidia.com \
--cc=zhiw@nvidia.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