From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [Bug] ARM: mxs: STI: console can't wake up from freeze
Date: Sat, 5 Nov 2016 18:05:42 +0000 [thread overview]
Message-ID: <20161105180542.GE1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <1113068116.152452.34665947-6f6b-41d6-92af-eabcbcb794ea.open-xchange@email.1und1.de>
On Sat, Nov 05, 2016 at 04:28:37PM +0100, Stefan Wahren wrote:
> As i wrote in my email before, i added a pr_info() into freeze_wake.
> But i never see the output of this message. So i assume freeze_wake
> is never called. Again, how could this happen?
Hmm, so the bit that you're getting stuck on is:
wait_event(suspend_freeze_wait_head,
suspend_freeze_state == FREEZE_STATE_WAKE);
Now there's two things about this here - it's a non-interruptible wait,
so I think the hung task detection may trigger on that (I'm not entirely
sure on that point though, and I don't have time this evening to read
the code to find out.)
The second thing is, that in order to pass this point, something has to
call freeze_wake().
There's not that many possibilities for that:
$ git grep freeze_wake drivers kernel
drivers/base/power/wakeup.c: freeze_wake();
drivers/base/power/wakeup.c: freeze_wake();
kernel/power/suspend.c:void freeze_wake(void)
kernel/power/suspend.c:EXPORT_SYMBOL_GPL(freeze_wake);
One of those is pm_system_wakeup(), the other is wakeup_source_activate()
via wakeup_source_report_event() via __pm_stay_awake() or
__pm_wakeup_event().
Looking at the results of:
$ grep 'pm_wakeup_event\|pm_stay_awake\|pm_system_wakeup' drivers kernel -r
it looks like for freeze support to work, various drivers need to call
one of these functions.
The iMX serial driver doesn't call any of these functions, so I can't
see how we'd get past this point - and from that grep you'll see nothing
in kernel/irq touches any of these functions.
Documentation/power/suspend-and-interrupts.txt does a very poor job
(which is typical) of describing what the requirements are for
"suspend-to-idle", it doesn't really say that any of the above
functions must be called and it doesn't say who's responsible for
calling these functions. It does talk about "pm_system_wakeup()"
for "rare cases".
So my conclusion, based on the poor documentation and the results of
my greps, is that "freeze" aka "suspend-to-idle" is not supported on
the majority of hardware, and attempting to use it will result in the
system locking up in exactly the way you're seeing.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2016-11-05 18:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-23 9:19 [Bug] ARM: mxs: STI: console can't wake up from freeze Stefan Wahren
2016-10-23 13:31 ` Russell King - ARM Linux
2016-10-29 11:44 ` Stefan Wahren
2016-10-31 16:17 ` Russell King - ARM Linux
2016-10-31 19:54 ` Stefan Wahren
2016-11-01 9:23 ` Russell King - ARM Linux
2016-11-05 11:07 ` Stefan Wahren
2016-11-05 11:39 ` Zhang Rui
2016-11-05 12:01 ` Stefan Wahren
2016-11-05 13:00 ` Daniel Lezcano
2016-11-05 15:28 ` Stefan Wahren
2016-11-05 18:05 ` Russell King - ARM Linux [this message]
2016-11-06 10:20 ` Stefan Wahren
2016-11-06 14:55 ` Daniel Lezcano
2016-11-06 18:31 ` Stefan Wahren
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=20161105180542.GE1041@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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 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).