linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Peng Fan <peng.fan@oss.nxp.com>,
	abelvesa@kernel.org, Lucas Stach <l.stach@pengutronix.de>,
	ulf.hansson@linaro.org, linux-pm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, aisheng.dong@nxp.com,
	kernel@pengutronix.de, Shawn Guo <shawnguo@kernel.org>,
	s.hauer@pengutronix.de, festevam@gmail.com,
	Stephen Boyd <sboyd@kernel.org>
Subject: Re: Help: i.MX8MP AUDIOMIX BLK-CTRL CLK driver support
Date: Mon, 26 Sep 2022 02:04:31 +0200	[thread overview]
Message-ID: <09bb716b-1f6b-c422-8469-fd2a0ac9f946@denx.de> (raw)
In-Reply-To: <d23cacb6-4914-7eba-ed6e-c8490b9b771a@oss.nxp.com>

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

  parent reply	other threads:[~2022-09-26  0:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23  3:41 Help: i.MX8MP AUDIOMIX BLK-CTRL CLK driver support Peng Fan
2022-09-23  8:18 ` Lucas Stach
2022-09-27  9:36   ` Peng Fan
2022-09-26  0:04 ` Marek Vasut [this message]
2022-09-27  3:26   ` Peng Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09bb716b-1f6b-c422-8469-fd2a0ac9f946@denx.de \
    --to=marex@denx.de \
    --cc=abelvesa@kernel.org \
    --cc=aisheng.dong@nxp.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peng.fan@oss.nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).