From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Linux-sh list <linux-sh@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Magnus Damm <magnus.damm@gmail.com>
Subject: Re: [PATCH 1/3] PM / Sleep: Mark devices involved in wakeup signaling during suspend
Date: Wed, 2 Nov 2011 10:29:35 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.1111021015350.18080@axis700.grange> (raw)
In-Reply-To: <201110200013.56428.rjw@sisk.pl>
Hi Rafael
Just something, that made me wonder:
On Thu, 20 Oct 2011, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rjw@sisk.pl>
>
> The generic PM domains code in drivers/base/power/domain.c has
> to avoid powering off domains that provide power to wakeup devices
> during system suspend. Currently, however, this only works for
> wakeup devices directly belonging to the given domain and not for
> their children (or the children of their children and so on).
> Thus, if there's a wakeup device whose parent belongs to a power
> domain handled by the generic PM domains code, the domain will be
> powered off during system suspend preventing the device from
> signaling wakeup.
>
> To address this problem introduce a device flag, power.wakeup_path,
> that will be set during system suspend for all wakeup devices,
> their parents, the parents of their parents and so on. This way,
> all wakeup paths in the device hierarchy will be marked and the
> generic PM domains code will only need to avoid powering off
> domains containing devices whose power.wakeup_path is set.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> drivers/base/power/domain.c | 4 ++--
> drivers/base/power/main.c | 8 +++++++-
> include/linux/pm.h | 1 +
> 3 files changed, 10 insertions(+), 3 deletions(-)
[snip]
> Index: linux/include/linux/pm.h
> ===================================================================
> --- linux.orig/include/linux/pm.h
> +++ linux/include/linux/pm.h
> @@ -452,6 +452,7 @@ struct dev_pm_info {
> struct list_head entry;
> struct completion completion;
> struct wakeup_source *wakeup;
> + bool wakeup_path:1;
This is an interesting idea... I'd presume, the compiler is aware, that
one bit is enough for "bool," so, it should choose an optimal
implementation by itself? I checked gcc 4.4.1 on ARM - without the
bitfield notation the compiler just uses one byte in my example. Anyway,
not a request-for-change, just wondering whether you really were trying to
(potentially) save a couple of bits here or what was the motivation.
> #else
> unsigned int should_wakeup:1;
> #endif
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
next prev parent reply other threads:[~2011-11-02 9:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-19 22:12 [PATCH 0/3] Support for A3SP and A4R domains on SH7372 Rafael J. Wysocki
2011-10-19 22:13 ` [PATCH 1/3] PM / Sleep: Mark devices involved in wakeup signaling during suspend Rafael J. Wysocki
2011-11-02 9:29 ` Guennadi Liakhovetski [this message]
2011-10-19 22:14 ` [PATCH 2/3] ARM: mach-shmobile: sh7372 A3SP support (v4) Rafael J. Wysocki
2011-10-19 22:15 ` [PATCH 3/3] ARM: mach-shmobile: sh7372 A4R " Rafael J. Wysocki
2011-11-02 10:38 ` Guennadi Liakhovetski
2011-11-02 14:18 ` Magnus Damm
2011-11-02 20:52 ` Guennadi Liakhovetski
2011-11-02 22:00 ` Guennadi Liakhovetski
2011-11-02 23:17 ` Rafael J. Wysocki
2011-11-16 21:05 ` Guennadi Liakhovetski
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=Pine.LNX.4.64.1111021015350.18080@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=rjw@sisk.pl \
/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
all inboxes | Powered by JetHome®