[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+ASDXO-61=D0DM+d4dNCbEYV3omroFbbFao3YrUPOYy+7AJUg@mail.gmail.com>
Date: Fri, 4 Feb 2022 12:05:07 -0800
From: Brian Norris <briannorris@...omium.org>
To: Mark Brown <broonie@...nel.org>
Cc: Peng Fan <peng.fan@....com>,
"rafael@...nel.org" <rafael@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
dl-linux-imx <linux-imx@....com>,
"S.j. Wang" <shengjiu.wang@....com>
Subject: Re: regmap: mmio: lack of runtime_pm support for debugfs
After a bit more thinking:
On Fri, Feb 4, 2022 at 11:21 AM Brian Norris <briannorris@...omium.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
Powered by blists - more mailing lists