Thread (6 messages) 6 messages, 3 authors, 2017-02-02

Re: [PATCH] PM / Domains: Correct comment in irq_safe_dev_in_no_sleep_domain()

From: Ulf Hansson <hidden>
Date: 2017-02-02 09:55:53

On 31 January 2017 at 18:17, Geert Uytterhoeven [off-list ref] wrote:
Hi Ulf,

On Tue, Jan 31, 2017 at 5:41 PM, Ulf Hansson [off-list ref] wrote:
quoted
On 31 January 2017 at 17:17, Geert Uytterhoeven [off-list ref] wrote:
quoted
On Tue, Jan 31, 2017 at 5:01 PM, Ulf Hansson [off-list ref] wrote:
quoted
The earlier comment stated that the dev_warn_once() was going to be printed
once per device. Let's fix that, as dev_warn_once() is printed only once,
no matter of the device.
While I agree this makes the comment match the code, I think we would serve
the users better by printing the warning once per PM domain.
Currently the user cannot know if two or more PM domains cannot be powered
off due to IRQ safe devices.
Right.
quoted
Perhaps a flag can be added to generic_pm_domain.flags to remember
that the warning has been printed before?
That seems like a reasonable adjustment. Allow me to cook a patch on
top of this one.
Thanks!
quoted
Moreover, I was thinking of considering to check for always on domains
and perhaps skip printing this message in such cases. Would that make
sense as well?
That would make sense.

But how would you check that?
By comparing its governor with &pm_domain_always_on_gov?
Note that that is not sufficient, as I think its power_off() callback will still
be called. Only if it fails to power off and returns -EBUSY, it's a real
always-on domain.
Hi Geert,

Correct! At this point, I am looking into how I in general can improve
the code in genpd dealing with always on PM domains.

It seems like the genpd client, shouldn't need to implement the
->power_off|on() callbacks at all, but instead just configure the
genpd at init time as an always on PM domain.

Then that information can be used in genpd at various places, to do
optimizations and likely to avoid printing non-needed errors/warnings.
I keep you posted.

Kind regards
Uffe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help