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=1796018018; b=O/Z+Gjj1/UvkAC543j2Z9VYkIoS309LBxcVk6qTZhTmI6JAM4r8ZY98azIBFXt+odYcj bp+DOYWJ7iWv6yhUeR1X08GCzM+o9K7eiOAB77SftPzKjDPXv9+R07gUGf/6NaOdgZFmM jAsrN5DeiuIqtVJebntiD23ghkMIyYa7M0vbmWqHfVc+8cuezgmdeRi7ZClCB/vYj7mE/ eIf1K+sUtQyH6iFUKXF1TozuLzn/rF8w7Nb+0GqCwWVD/AGppaUTlnmzwOA92VhTPzpEI wuJy8pL/kwW9Aa+O5PotyE+wYpqKVuCWXNzZo/MRJuX3e+hhta40nMYmr9JLNXWlU1A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796018018; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=NacrDqIlfcMMQj/TyO7LuXcjTh491aSeHruh7GKMg5E=; b=3VoCPL44ZOJ1LWdjh5wECv++QYM2wmTkK18k5I7w6oDxPhLu35/RL8/O12bE5GimxgcV 47vmAnN+3OEy1Q459WDeu786sWB1yweviEsGNIoTmjWdYCp1pcVV/itvpo0XkAFSnxBYl tA8MXRXhFiGAnwY8ghIuRyCba6IXlHsnEKc+lYlfjLLOZESzQddkk0TCUYVnKoBscS8RZ j/M7FNXTxEX6qvLGxrzmCeHTyT14KdzJ2Wb0MkpJSSf93Uj1DcMsiokK1tBg469KmxJqS RwcVhl4eUQGa4/+K4yTjNCPxhQJ25NldLI5qOJeecFVZTiX2rEpScvQarR0UClFGdKQ== 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=TMre7Lm9; 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 E96E9606A31C; Mon, 30 Nov 2026 05:53:37 +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=TMre7Lm9 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B0931F000C1; Mon, 30 Nov 2026 05:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796018017; bh=NacrDqIlfcMMQj/TyO7LuXcjTh491aSeHruh7GKMg5E=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=TMre7Lm9dmKg9RgcOGhTmZ59XWLHrtMZCi/aPZctWP+BMtNx1IJps9nZ181HWmRfy N4nOGsyowy6CQms0+cvv8JFupoBCmqlxuWP4rshJzvahCmdsaylR8XeT390tJ0n6YA 2V1R+SDq2A+HY+Y6umJ4RcEbAeen6On6kCdJRwtnaeMJm7QBevXPy2odMN4FOoc0R7 MjuS4LWwXneGJIw+Cny8cmJSWtphbdXsDvliMIyLJ1MLHjgek1q87xuVuGlkTyS1z6 Q3Q/1wd+Eel/vjvtBNgDdnXErGFR2+nxE72IgxcM8FAvc/UNgT6rlYcFUhNoxS6y1w pbmSTq1daXt1A== Date: Sun, 29 Nov 2026 21:53:36 -0800 From: Drew Fustini To: Brian Masney Cc: Lee Jones , Joel Stanley , Anirudh Srinivasan , Stephen Boyd , Brian Masney , Jerome Brunet , linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2] clk: tenstorrent: Use prepare/unprepare ops for Atlantis PLL Message-ID: References: <20261127132958.2714501-1-lee@kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sun, Nov 29, 2026 at 04:43:53PM -0500, Brian Masney wrote: > Hey Drew, > > On Sat, Nov 28, 2026 at 09:52:45PM -0800, Drew Fustini wrote: > > On Fri, Nov 27, 2026 at 01:29:36PM +0000, Lee Jones wrote: > > > The Common Clock Framework invokes .enable callbacks in atomic context > > > with interrupts disabled and enable_lock held. In atlantis_clk_pll_ops, > > > atlantis_clk_pll_enable() is registered as the .enable callback yet > > > waits for PLL lock using regmap_read_poll_timeout() with a 500 us sleep > > > interval, triggering a sleep-in-atomic bug via usleep_range(). > > > > > > Convert atlantis_clk_pll_ops to use .prepare, .unprepare, and > > > .is_prepared instead of .enable, .disable, and .is_enabled so that the > > > PLL lock wait executes under the sleeping prepare_lock rather than > > > atomic enable_lock. > > > > > > Fixes: 23c8ebc95284 ("clk: tenstorrent: Add Atlantis clock controller driver") > > > Closes: https://sashiko.dev/#/bug/linux-980395a6-f282-478a-bf18-b5695a725735 > > > Cc: stable@vger.kernel.org > > > Signed-off-by: Lee Jones > > > --- > > > v1 => v2: > > > - Switch from .enable/.disable/.is_enabled to .prepare/.unprepare/.is_prepared so PLL lock polling runs under the sleeping prepare_lock instead of enable_lock, per Brian Masney's review. > > > - Keep regmap_read_poll_timeout() rather than switching to the atomic variant. > > > - Drop Anirudh Srinivasan's v1 Reviewed-by tag due to the implementation change. > > > - Drop the other patches from v1 that were already applied or superseded. > > > > Reviewed-by: Drew Fustini > > > > Brian - should I take this through tenstorrent-clk-for-next, or are you > > planning to apply it? > > I'm fine either way. Let me know what you prefer. > > Brian I would appreciate it if you could take it as I don't have anything queue this cycle for the tenstorrent clk branch. Thanks, Drew