From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33D8F606A329 for ; Sun, 29 Nov 2026 21:44:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=OxYFfdEa; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bnkJ3uyC DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=9u5qQlDp3BeqCjwU6eB7V6Ymn4CH4Tjw0FVZZUI1mvA=; b=OxYFfdEa/Nf0UxdpVnIkOdOs2w kVQhI+4DhCb4KY8nFWdnAJvFE8a91QH8v0Ltvz9xT2i3s5LMLTjG18pkRz33/qbsJd96bzbrP7YOf qlqA+JrtGtPCBsNPiDLecTDxGq2hac7PVqyV1np3SEEStm17OG9k8Xsz/1HFuMH/nvpyfac8qGD++ J985Nh2a1MEHQw9VB8TT9vhl/Sm7J8Qgjwd4JhA6YNd647pZikHTazJ2us/pf/TVe2GGVQa6Yk/9B RaxhKHd4tpTQl3EE0mQqMR6Esk5PH9ntTJzcEwLChY/H9MbM2bzU7W8sjPfg0jBTd4JkJsBsV7lTF f8MWvV9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXmgr-00000002WLc-3VBp; Sun, 29 Nov 2026 21:44:09 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXmgp-00000002WLW-3cKl for linux-riscv@lists.infradead.org; Sun, 29 Nov 2026 21:44:07 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id D8D9943B46; Sun, 29 Nov 2026 21:44:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 334151F00896; Sun, 29 Nov 2026 21:43:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795988646; bh=aCetZevyhOlkg5f3xGJlLc35C0Bc9tQjhoKZP1DUvig=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=bnkJ3uyCIoX2s1Vgv8ivRflwYBAi42Ekmlm/17zvJGxqiKkFZsbShhi7EAUqDO2Da bpVA0Vn5LwMnNloD0nqnyfRsZXTcZCYUy0JNw2Hf5t5rvPdOpeuo2ztFFrqjnEwjMx RW1uQNBDeY7MPoe7kk9DS0E/IhK17SYiob2jibMUpXoeHmrCtS9CzKtmgPwZylJGcq K7KWLxCutG/j90ZgGSJmargri0s3skXZhyCeld+t2EsDupbM/NhEt8jAU9UddvchU+ NUsg71ko2nYaWtZYX8L1DIpI+lZUtQJEE7jrWlCzwgLrNl3/q4znXYoTto6xpXkVhF AP9JSb3dd4+IQ== Date: Sun, 29 Nov 2026 16:43:53 -0500 From: Brian Masney To: Drew Fustini 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-Archived-By: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.4.3 (2026-10-09) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" X-Spam-Status: No, score=-10.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv