Messages in this thread | | | From | Brian Norris <> | Date | Fri, 4 Feb 2022 12:05:07 -0800 | 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@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
| |