From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A375D2FC034; Fri, 22 Aug 2025 12:58:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755867482; cv=none; b=fvPHObBh+OToMQZc3REZxW8Y0e3ngKwBV4CIaMdarcVPjMs84UYwiNiTQpDK0nfYSUij9Vq6jA7dbdNqj1ARJERZZ+Y6iJZuB4Jqg3SPDectarfajwbEYzTb9fJRwaZt3GxTSMqgL7gvrg9X/A0IwUlNtZ2ep8QTcziey5enBNg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755867482; c=relaxed/simple; bh=NthJul2t/ihkNQEDNJDxStrByPgsFY1WvD6qbeKO9zc=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=J0MJn8iD9JDtpqieOMC2Q+yDtGFjc1sOi2pRbb85rE0DwdEHh1rs5IZIBe7UKo+HWry/jAFvEmVCmGNJTF832SwSNfd9rtjUKQkySIAXuXkYasSfZfa6TwgeY1Jl+85GOD9hPfiIvPISpNYttl1dnQhU+pwW+6KD2XGbXFXvoBo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ld4V7Snz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ld4V7Snz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5B36C4CEED; Fri, 22 Aug 2025 12:57:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755867482; bh=NthJul2t/ihkNQEDNJDxStrByPgsFY1WvD6qbeKO9zc=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=Ld4V7SnzrCinLkVqtfXR19IT/hb1L9Tyb7FRqml4IsQfef9ypJcEfou5A31TbgctY Dcqn+lvrg+NzS/GnUjmVgAH19bZvj4EIaMuzQjl6RKT5xx194NJQ0IzYL5+hg1WcaR 9fAHCcQz3P1o4/Wrb7XKZiOeeWKqiJmdEGiDJAPbkIqwH//4fWylhFJ69/5CBrUOVT wb0az991RPI2g4veMLJceH7H92NkEmTLkt3VXz1Ng1u9iQXpyJWfxTyyUs2wa2Oeq9 jsM+BypbyKe0rJEdESPC8EIz1V78M9PEIZtRyaUOub1E898ol9BSUazGmXujY2eZdC SDH2cEZipJjpA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 22 Aug 2025 14:57:55 +0200 Message-Id: Subject: Re: [PATCH 5/5] gpu: nova-core: firmware: process and prepare the GSP firmware Cc: "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , "David Airlie" , "Simona Vetter" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , , , , To: "Alexandre Courbot" From: "Danilo Krummrich" References: <20250822-nova_firmware-v1-0-ff5633679460@nvidia.com> <20250822-nova_firmware-v1-5-ff5633679460@nvidia.com> In-Reply-To: <20250822-nova_firmware-v1-5-ff5633679460@nvidia.com> Hi Alex, not a full review yet, but a few ad-hoc comments from skimming over it. On Fri Aug 22, 2025 at 2:47 PM CEST, Alexandre Courbot wrote: > +/// A device-mapped firmware with a set of (also device-mapped) pages ta= bles mapping the firmware > +/// to the start of their own address space. > +pub(crate) struct GspFirmware { > + /// The GSP firmware inside a [`VVec`], device-mapped via a SG table= . > + #[expect(unused)] Do we expect this to change? Otherwise, just prefix the field name with an underscore. > + fw: Pin>>>>, > + /// The level 2 page table, mapping [`Self::fw`] at its beginning. > + #[expect(unused)] > + lvl2: Pin>>>>, > + /// The level 1 page table, mapping [`Self::lvl2`] at its beginning. > + #[expect(unused)] > + lvl1: Pin>>>>, Instead of creating three allocations, just make struct GspFirmware pin_dat= a by itself. This should even propagate down to struct Gpu, which is pin_data. So everything can be in one single allocation. > + /// The level 0 page table, mapping [`Self::lvl1`] at its beginning. > + lvl0: DmaObject, > + /// Size in bytes of the firmware contained in [`Self::fw`]. > + #[expect(unused)] > + pub size: usize, > +}