From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46C6DC04A95 for ; Mon, 26 Sep 2022 00:06:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:To:Subject:MIME-Version: Date:Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=42/iq2aJlgleZEdfSuaFkA8vvxRmHtJCpE2c6+5fSLo=; b=sWoP3IUaqVXMLQtmyEFiPL21BA v66eSqyb6jS9KoryzZJ0AwSgkSPFcNcsxT5mQYye+5LuuNgw/X+6KiN6l7nsG3yi674dEeJJ9wwOD jDgSxsXSGVNBhrdpCQWabXPkwZlo/U0vm59oF3UxIi6KFOJ1XQlnfH6OdP4w80PqrvUL2k7lBt7Da pA1XfPAGgNqQyTSoy1fZwCwTfseMA9XC7pyldaqxf6fnw9bqBWDAk4zQvXMg3kqGUBKW2SVGd4rdL p+ASJhSQqcBSquPAMBnJN49qp7LCd7/NNz6c1rkrEGgI3eWseh9G58Xt4DmHHCVEQvctYZRJtKegz 21eBRPSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ocbc0-000K70-7m; Mon, 26 Sep 2022 00:04:40 +0000 Received: from phobos.denx.de ([2a01:238:438b:c500:173d:9f52:ddab:ee01]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ocbbw-000K5L-D1 for linux-arm-kernel@lists.infradead.org; Mon, 26 Sep 2022 00:04:38 +0000 Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 47F3B84AEB; Mon, 26 Sep 2022 02:04:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1664150673; bh=j349grgiD+qDGFyqq7yYemiJ/SibokcKVoA3tOP6tso=; h=Date:Subject:To:References:From:In-Reply-To:From; b=L6jOFk27Emj1l4xEvxKViGQcJzOUo1eRHFyI2MM8wivdk+zPbVA1/gJOFM7OnS41q uoEgpf4HTt99fswgTBGZLTxsYDlkCY/ouYBrchvnVfEFbGlh7I2gtyC6nCP4aDnQT6 kA5QGhNC82FVuTGCLgKYZ7KbD7HAUV4Q2/wr6sTDyf8B98+vo4ZC6/QhOer+c5nJ3B D1QEXTrKD+NsfCdWKr7AYVnDPUG2bbM1JsqKsOEkNXHr+YqBDsYHxqS1uHJW+nzjns msxTXINn4wJ84fJYkTsYGGR4YlEJpzYxMk9xueok7vBh+5ezwVxaybiEDvjj6akfc6 iU8EphBx1EzDw== Message-ID: <09bb716b-1f6b-c422-8469-fd2a0ac9f946@denx.de> Date: Mon, 26 Sep 2022 02:04:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: Help: i.MX8MP AUDIOMIX BLK-CTRL CLK driver support To: Peng Fan , abelvesa@kernel.org, Lucas Stach , ulf.hansson@linaro.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, aisheng.dong@nxp.com, kernel@pengutronix.de, Shawn Guo , s.hauer@pengutronix.de, festevam@gmail.com, Stephen Boyd References: Content-Language: en-US From: Marek Vasut In-Reply-To: X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220925_170436_643682_5ECE22A9 X-CRM114-Status: GOOD ( 14.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 9/23/22 05:41, Peng Fan wrote: > Hi All, Hi, > I would start a discussion about the A/B B/A lock issue when make > audiomix blk ctrl function as clk provider. > > I not have good idea on this, hope you have any suggestions. > > major issue is: the blk ctrl clk has a power domain supplier > The power domain supplier also use clk API to prepare_enable clks. > The blk ctrl clk driver has runtime pm enabled. > > The NXP downstream: > The dts: > https://github.com/nxp-imx/linux-imx/blob/lf-5.15.y/arch/arm64/boot/dts/freescale/imx8mp.dtsi#L1872 > > The driver: > https://github.com/nxp-imx/linux-imx/blob/lf-5.15.y/drivers/clk/imx/clk-imx8mp.c > https://github.com/nxp-imx/linux-imx/blob/lf-5.15.y/drivers/clk/imx/clk-blk-ctrl.c > > Note: The following log was reproduced with NXP downstream. For upstream > I think we have similar issue if we still take audiomix blk ctrl as clk > driver. Because the gpcv2 also use clk prepare enable API. > 1. deadlock 1: > Callchain after enable some lock debug: > clk_ignore_unused will use lock seq: take prepare lock, take blk-ctrl > parent power domain genpd lock > genpd_power_off_work_fun will use lock seq: take the power domain genpd > lock, take prepare lock. There is also this driver which does not suffer from the problem, at least I didn't trigger it while using it for months: https://patchwork.kernel.org/project/linux-clk/patch/20220625013235.710346-3-marex@denx.de/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel