linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Mark Brown <broonie@kernel.org>
Cc: Peng Fan <peng.fan@nxp.com>,
	"rafael@kernel.org" <rafael@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	"S.j. Wang" <shengjiu.wang@nxp.com>
Subject: Re: regmap: mmio: lack of runtime_pm support for debugfs
Date: Fri, 4 Feb 2022 12:05:07 -0800	[thread overview]
Message-ID: <CA+ASDXO-61=D0DM+d4dNCbEYV3omroFbbFao3YrUPOYy+7AJUg@mail.gmail.com> (raw)
In-Reply-To: <CA+ASDXP+KeiRKASFakDjJ=cZPD_rGmV4=JgRH26zQi-uZDdiAQ@mail.gmail.com>

After a bit more thinking:

On Fri, Feb 4, 2022 at 11:21 AM Brian Norris <briannorris@chromium.org> wrote:
> Anyway, I'll probably just go with precious_reg() as suggested above.

Unfortunately, precious_reg() wouldn't be quite safe either -- we
could do a single check for pm_runtime_active(), but we have no way of
knowing (guaranteeing) that it will remain active throughout the
remainder of the debugfs operation. For all we know, some other actor
could be *just* finishing with (and PM-suspending) our domain
immediately after the check. And we can't grab a reference, because we
don't have a callback for balancing that back out.

If I really want to solve this, I might have to go with adding a
debugfs-specific runtime_pm flag, and (to avoid too many side effects)
use that with pm_runtime_get_if_active() in regmap-debugfs.c.

Brian

      parent reply	other threads:[~2022-02-04 20:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23  5:46 [PATCH] regmap: mmio: prepare/unprepare clk only when read/write peng.fan
2020-04-23 10:39 ` Aisheng Dong
2020-04-23 10:40 ` Mark Brown
2020-04-23 10:51   ` Peng Fan
2020-04-23 11:22     ` Mark Brown
2020-04-24  1:27       ` Peng Fan
2020-04-24 10:30         ` Mark Brown
2022-01-24 23:50           ` regmap: mmio: lack of runtime_pm support for debugfs Brian Norris
2022-02-04 19:02             ` Mark Brown
2022-02-04 19:21               ` Brian Norris
2022-02-04 19:41                 ` Mark Brown
2022-02-04 19:53                   ` Brian Norris
2022-02-05 18:25                     ` Mark Brown
2022-02-04 20:05                 ` Brian Norris [this message]

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='CA+ASDXO-61=D0DM+d4dNCbEYV3omroFbbFao3YrUPOYy+7AJUg@mail.gmail.com' \
    --to=briannorris@chromium.org \
    --cc=broonie@kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=rafael@kernel.org \
    --cc=shengjiu.wang@nxp.com \
    /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).