From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
"Len Brown" <len.brown@intel.com>, "Pavel Machek" <pavel@ucw.cz>,
"Linux PM list" <linux-pm@vger.kernel.org>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"Kevin Hilman" <khilman@linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Krzysztof Kozłowski" <k.kozlowski@samsung.com>
Subject: Re: [PATCH] PM / Domains: restore calling of .suspend/resume_noirq() callbacks
Date: Thu, 13 Nov 2014 21:30:57 +0200 [thread overview]
Message-ID: <546506F1.1020306@ti.com> (raw)
In-Reply-To: <CAMuHMdV2JdEhvMsOahaMH8RUO12sit_39AfcWUFD9eGCYCCKGA@mail.gmail.com>
On 11/13/2014 09:11 PM, Geert Uytterhoeven wrote:
> On Thu, Nov 13, 2014 at 7:43 PM, Grygorii Strashko
> <grygorii.strashko@ti.com> wrote:
>> On 11/13/2014 03:33 AM, Rafael J. Wysocki wrote:
>>> On Wednesday, November 12, 2014 06:00:47 PM Grygorii Strashko wrote:
>>>> Now .suspend/resume_noirq() callbacks will not be called during
>>>> system wide suspend/resume for devices which belongs to some GPD.
>>>> It seems, that this change was accidentally introduced by
>>>> commit d23b9b00cdde ("PM / Domains: Rework system suspend callback
>>>> routines (v2)").
>>>
>>> I'm not sure if that was really accidentally.
>>>
>>> Can you describe the problem that the change below is attempting to
>>> address, without going to much into the history? IOW, what's that
>>> doesn't work right now?
>>
>> There are no real issues - now in Kernel there are no users of GPD
>> which use "noirq" callbacks.
>
> Indeed.
>
> But as the .suspend_noirq() and .resume_noirq() callbacks are not called
> when using the generic PM domain, I had to manually handle interrupt
> disable/enable in commit a00d91ea264f974b ("fbdev: sh_mobile_hdmi:
> Re-init regs before irq re-enable on resume").
^ Honestly, this is very useful practice, because with SMP enabled
the IRQ can be triggered after .suspend() and before .suspend_noirq()
which, in turn, may schedule some kthread/work or even threaded_irq_handler
on secondary cpus (disable_nonboot_cpus() is called after suspend_noirq stage).
Funny things may happen after that :P like: some work/thread which is
servicing request from I2C device (for example) will be frozen in the middle of
its execution and then it will be resumed right after enable_nonboot_cpus().
^Issue from real life.
regards,
-grygorii
WARNING: multiple messages have this Message-ID (diff)
From: grygorii.strashko@ti.com (Grygorii Strashko)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PM / Domains: restore calling of .suspend/resume_noirq() callbacks
Date: Thu, 13 Nov 2014 21:30:57 +0200 [thread overview]
Message-ID: <546506F1.1020306@ti.com> (raw)
In-Reply-To: <CAMuHMdV2JdEhvMsOahaMH8RUO12sit_39AfcWUFD9eGCYCCKGA@mail.gmail.com>
On 11/13/2014 09:11 PM, Geert Uytterhoeven wrote:
> On Thu, Nov 13, 2014 at 7:43 PM, Grygorii Strashko
> <grygorii.strashko@ti.com> wrote:
>> On 11/13/2014 03:33 AM, Rafael J. Wysocki wrote:
>>> On Wednesday, November 12, 2014 06:00:47 PM Grygorii Strashko wrote:
>>>> Now .suspend/resume_noirq() callbacks will not be called during
>>>> system wide suspend/resume for devices which belongs to some GPD.
>>>> It seems, that this change was accidentally introduced by
>>>> commit d23b9b00cdde ("PM / Domains: Rework system suspend callback
>>>> routines (v2)").
>>>
>>> I'm not sure if that was really accidentally.
>>>
>>> Can you describe the problem that the change below is attempting to
>>> address, without going to much into the history? IOW, what's that
>>> doesn't work right now?
>>
>> There are no real issues - now in Kernel there are no users of GPD
>> which use "noirq" callbacks.
>
> Indeed.
>
> But as the .suspend_noirq() and .resume_noirq() callbacks are not called
> when using the generic PM domain, I had to manually handle interrupt
> disable/enable in commit a00d91ea264f974b ("fbdev: sh_mobile_hdmi:
> Re-init regs before irq re-enable on resume").
^ Honestly, this is very useful practice, because with SMP enabled
the IRQ can be triggered after .suspend() and before .suspend_noirq()
which, in turn, may schedule some kthread/work or even threaded_irq_handler
on secondary cpus (disable_nonboot_cpus() is called after suspend_noirq stage).
Funny things may happen after that :P like: some work/thread which is
servicing request from I2C device (for example) will be frozen in the middle of
its execution and then it will be resumed right after enable_nonboot_cpus().
^Issue from real life.
regards,
-grygorii
next prev parent reply other threads:[~2014-11-13 19:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-12 16:00 [PATCH] PM / Domains: restore calling of .suspend/resume_noirq() callbacks Grygorii Strashko
2014-11-12 16:00 ` Grygorii Strashko
2014-11-12 16:00 ` Grygorii Strashko
2014-11-13 1:33 ` Rafael J. Wysocki
2014-11-13 1:33 ` Rafael J. Wysocki
2014-11-13 18:43 ` Grygorii Strashko
2014-11-13 18:43 ` Grygorii Strashko
2014-11-13 18:43 ` Grygorii Strashko
2014-11-13 19:11 ` Geert Uytterhoeven
2014-11-13 19:11 ` Geert Uytterhoeven
2014-11-13 19:30 ` Grygorii Strashko [this message]
2014-11-13 19:30 ` Grygorii Strashko
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=546506F1.1020306@ti.com \
--to=grygorii.strashko@ti.com \
--cc=geert@linux-m68k.org \
--cc=k.kozlowski@samsung.com \
--cc=khilman@linaro.org \
--cc=len.brown@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.