From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796300805; b=tLKDN193ibBXY9TVK7p43rqBjiXikLHjJc9Siat1xUW1numae13S6RqXIQJ5Ajge9yqq 3FDeuobGOpHKwrV6TycAkZkrqhLQMPp+eASY/f4luSOcvidRhcYOuftVdAFQHVm392RJU jZwVKhwdtvhZmYj6QcQ3x38huw2GNFcPA7N255MTMQZVzRGrhfccQo55/PaFpvxei+e1e J4wzzJCaPkcIMSDUtvM9vq4wkc3MnLBFXwwih0OLdCvhZ6JYtd7ZDdv1CjeldvcSYnEVC yFE9KRvkICQkvZ9acaHZttYfJhtKJtQW4IgBNDFGPbHnUIpekHjb7laavgH+vaF5DMA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796300805; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=giA6q0hc15XByUZO/vzzdskzrrtSCy42As684TCW8U4=; b=xiYwxc0djD7RSnRLu+luyFOlyDb6zUojCn9fblWR9M5aQs7yx9CEtvTTdIUZq5VbsRqA Z9RW8a79srODMSibTNr00bnywpGFHRSZRT4FtyiTGFK6Qh8qI/NOdn/OoXm35TlXlUAdx OOWV96wTjjHVUuwBkRAxWqDu7IALrJg99rZlwJRK9/vQyFxOsozZamQ2XVxqvGOIpKjJy qBV22qn8skmjwopddG8H1+mj+7jR67ZcPq31BMtQN2kmfrDDmf6yaTYepFpG1/EKKFiYy 9GnfRg7BI+MyzkYRO7IVasPZcT3w5VgMl9yLUDFOWqDnhZMT99Ryqz+H4psKaZG9f+g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VLMvxJl1; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35D1C606A32F for ; Thu, 3 Dec 2026 12:26:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VLMvxJl1 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A958F1F00893; Thu, 3 Dec 2026 12:26:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796300805; bh=giA6q0hc15XByUZO/vzzdskzrrtSCy42As684TCW8U4=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=VLMvxJl1d4Pea2KR8aURaLiLaQZ22B9HMMq/3D1STbmU2rOJD6DvCJJJSCRD0Ymw2 cAODt2DczLHXQiebt8N5hDibyc1U0tQXZLz94xDe61OG8Z4W1P8xXbLKxfxhuMnNig /K92ghDKDFWSFE68fDt405oiZ+C2lS1px80EyRaqByZorMf286jr1FY7QDH1Rs0zlO +Nzm5C1cGHXH44FQ5Qrc0Q1H6fTvEEzzd7QyCnZFuRshme4JCuzakzMvpn1DTT0anX p+TJu124KXkLp6rpOkkGeR9GlGgZ9JqGILFgeMzYxjUY6vSQu8Lj5MFyN83xIltSNt AUZbtxMgYRFaA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 02/15] gpu: nova-core: gsp: add the GSP_INIT command and its reply Reply-To: sashiko-reviews@lists.linux.dev To: "Alexandre Courbot" , "Danilo Krummrich" , "Alice Ryhl" , "David Airlie" , "Simona Vetter" , "Miguel Ojeda" , "Boqun Feng" , "Gary Guo" , =?utf-8?b?QmrDtnJuIFJveSBCYXJvbg==?= , "Benno Lossin" , "Andreas Hindborg" , "Trevor Gross" , "Daniel Almeida" , "Tamir Duberstein" , =?utf-8?b?T251ciDDlnprYW4=?= , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "Jonathan Corbet" , "Shuah Khan" , "Randy Dunlap" Cc: "John Hubbard" , "Alistair Popple" , "Timur Tabi" , "Eliot Courtney" , "Zhi Wang" , "Alok Kumar" , nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org In-Reply-To: <20261203-b4-r000-switch-v1-2-b1463ec6dae2@nvidia.com> References: <20261203-b4-r000-switch-v1-0-b1463ec6dae2@nvidia.com> <20261203-b4-r000-switch-v1-2-b1463ec6dae2@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 12:26:42 +0000 X-Mailing-List: nova-gpu@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] gpu: nova-core: non-yielding 15s udelay busy-wait polling GspInit completion -- commit d8fe3c10d1e002df6f79291965859f48b65d0fb0 Author: John Hubbard gpu: nova-core: gsp: add the GSP_INIT command and its reply This commit adds the GMC GSP_INIT command, which encodes system information and registry keys into an NVKV payload for GSP-RM, and decodes the NVKV reply into GspStaticInfo. > diff --git a/drivers/gpu/nova-core/gsp/commands/gmc.rs b/drivers/gpu/nova= -core/gsp/commands/gmc.rs > new file mode 100644 > index 0000000000000..f74ada78f7ace > --- /dev/null > +++ b/drivers/gpu/nova-core/gsp/commands/gmc.rs > @@ -0,0 +1,133 @@ [ ... ] > +impl CommandToGsp for GspInit { > + const COMMAND: GmcCommandId =3D GmcCommandId::GspInit; > + /// Largest reply that the driver accepts, in bytes. > + const MAX_REPLY_SIZE: u32 =3D 48 * 1024; > + /// `GspInit` can take longer than 5 seconds to complete on some SKU= s. > + const COMPLETION_TIMEOUT: Delta =3D Delta::from_secs(15); [Severity: Medium] Can waiting up to 15 seconds for GspInit spin a CPU in a non-yielding udelay() loop? CmdqInner::await_gmc_reply() passes COMPLETION_TIMEOUT down to CmdqInner::wait_for_msg(), which polls via read_poll_timeout() with Delta::from_micros(1). fsleep() turns delays <=3D 10 us into udelay(), and read_poll_timeout() does not call cond_resched() inside the loop. On slower SKUs where GspInit takes more than 5 seconds (or if GSP-RM stalls until timeout), a CONFIG_PREEMPT_NONE or CONFIG_PREEMPT_VOLUNTARY kernel will monopolize a CPU for the entire wait, starving runnable tasks and delaying RCU quiescent states. Using a sleep delta above 10 us in CmdqInner::wait_for_msg(), or letting long-running commands like GspInit select a sleeping poll interval, would avoid spinning the CPU during this wait. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203-b4-r000-sw= itch-v1-0-b1463ec6dae2@nvidia.com?part=3D2