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=1795931567; b=2tCUh3mfn3HmETF/5Xi78U9j0fWZhr/ILHSolDYs2UC8XTO2ni3yFXWLYIJa97dU3wpq veW3v3Y7TqPzNdlCa9QXD87BPJvwDtgqrRn10rAqrYmTfdaCPjqIOILSxVMsyN0en2KqM 88fU/17bLEd0gS+bcxSjduHCPP1PD9J/BX/tIxNKjmzo/Sg0lcxhmUOkE/bOxA/w5iAQD DXHMg3N0+rS82ufo6hqFte55PCOZmVqLze35ykxOFsPjuSXYgi+lZcTOu9gmKsdkGS41y DJfHTSTJzd2wWgEdERb3uh4jC5RgpXBhHTz9ykRpb7/GU4aYdzwDwvyEsf7Zi7vwY5A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795931567; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=ZhAb32dMYg6GyOOP52jJ/+c+mJX6a5ydMbxZX/G1HvQ=; b=evBKtY/9bex8SkxFxJrZFRm0tS1VvMpH1Ef4hmWpfQjLGKrhb/nHGkMOvUfoQBfkFufu eOVJ2jlvh0mkdFybrzUsSabCOf4kyLmF0L4+T6evteIgrCMHNjgdpYvH5cXvggspxe0td avlUM4dKCKZeiH8RMXANiFgGB0OlFS2YjPbe1QmbKcLFoUYIlCfhvrsWMVcPWWLNcFdm8 4rChihZMNQwg+1WrA2jaFd+hBcvqSSGpvgyEMvLDtDn/BYclrUKIpKHfk97FOUSTDbRCv aQrHivc15sdxktk8toUEj95VfJR9/LJVUEyal6kW7j37+DwTLVQUtnMwTuceGUl73xw== 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=mgy8iBZD; 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 386D1606A31C; Sun, 29 Nov 2026 05:52:46 +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=mgy8iBZD Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91CD21F00897; Sun, 29 Nov 2026 05:52:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795931566; bh=ZhAb32dMYg6GyOOP52jJ/+c+mJX6a5ydMbxZX/G1HvQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=mgy8iBZDUQ2MghO+Sw1SdZDg2SlTOttnwTGZcJOH0cFUFVUYaH69Liakn/xzSkLdV mMZcFfbVbBLg3ibpk9/eI03oC2/L6gCOSZd3XLirX8Q3lhq/WsaFoIIaaZ8KmYrcOF I5yrEl3o1BlBagGZQMSOBN6iJB27P2Oz8deA0/8CFLHLntKrJT8ZbSpa5V51tsK0kS PyCMEPXYRiJGICczn5LiHr6c68ujfvWueeelYyw3rQlCp0/+uFfTW5DjbaefjIuK4K ldzwi/gCVT2FN50SiZgGy7q1oW8SIAkmzs5iwgVWcj5QSb5csqJgtfhrk9BRwGLUoS aLObLLwLIn29g== Date: Sat, 28 Nov 2026 21:52:45 -0800 From: Drew Fustini To: Lee Jones Cc: 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: <20261127132958.2714501-1-lee@kernel.org> 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? Thanks, Drew