From: Sebastian Ott <sebott@linux.vnet.ibm.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: RFC: additional event for pm_notifier
Date: Fri, 19 Mar 2010 09:40:39 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.00.1003190938350.2478@localhost> (raw)
In-Reply-To: <201003182158.06832.rjw@sisk.pl>
On Thu, 18 Mar 2010, Rafael J. Wysocki wrote:
> On Thursday 18 March 2010, Rafael J. Wysocki wrote:
> > On Thursday 18 March 2010, Sebastian Ott wrote:
> > >
> > > On Wed, 17 Mar 2010, Rafael J. Wysocki wrote:
> > >
> > > > On Wednesday 17 March 2010, Sebastian Ott wrote:
> > > > > hi,
> > > > >
> > > > > on s390 certain hw features which we normally enable in our init
> > > > > calls, get reset while restoring the hibernation image.
> > > > > so we need a trigger to reenable them before the device callbacks
> > > > > are called.
> > > > >
> > > > > is it possible to add an additional event for the existing
> > > > > pm_notifier (something like the attached patch)?
> > > > >
> > > > > regards
> > > > > sebastian
> > > > >
> > > > >
> > > > > Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
> > > > > ---
> > > > > include/linux/notifier.h | 1 +
> > > > > kernel/power/hibernate.c | 2 ++
> > > > > 2 files changed, 3 insertions(+)
> > > > >
> > > > > Index: linux-2.6/include/linux/notifier.h
> > > > > ===================================================================
> > > > > --- linux-2.6.orig/include/linux/notifier.h
> > > > > +++ linux-2.6/include/linux/notifier.h
> > > > > @@ -250,6 +250,8 @@ static inline int notifier_to_errno(int
> > > > > #define PM_POST_SUSPEND 0x0004 /* Suspend finished */
> > > > > #define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */
> > > > > #define PM_POST_RESTORE 0x0006 /* Restore failed */
> > > > > +#define PM_RESTORE_FINISHED 0x0007 /* Image restored, called prior to
> > > > > + device callbacks */
> > > > >
> > > > > /* Console keyboard events.
> > > > > * Note: KBD_KEYCODE is always sent before KBD_UNBOUND_KEYCODE, KBD_UNICODE and
> > > > > Index: linux-2.6/kernel/power/hibernate.c
> > > > > ===================================================================
> > > > > --- linux-2.6.orig/kernel/power/hibernate.c
> > > > > +++ linux-2.6/kernel/power/hibernate.c
> > > > > @@ -290,6 +290,8 @@ static int create_image(int platform_mod
> > > > > if (!in_suspend)
> > > > > platform_leave(platform_mode);
> > > > >
> > > > > + pm_notifier_call_chain(PM_RESTORE_FINISHED);
> > > >
> > > > Hmm. Why can't you put that in platform_leave()?
> > >
> > > i'm confused, are you suggesting to put the actual statement in
> > > platform_leave? this would change that all these platform_* functions
> > > are nop's if platform_mode isn't set (i need the trigger independent
> > > of the hibernation_mode)
> > >
> > > or are you suggesting to implement platform_hibernation_ops for s390?
> >
> > This one.
> >
> > > - this seems a bit too much since i only need one trigger,
> >
> > So you don't need to implement the other ones. :-)
> >
> > You'll need to remove the check in hibernation_set_ops(), but that's fine.
>
> Oops, scratch that. It's not enough. There are a few helper functions
> in kernel/power/hibernate.c that will need to be updated along with that.
>
> Rafael
>
ok, thanks again. i'll try that over the weekend
sebastian
next prev parent reply other threads:[~2010-03-19 8:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 18:56 RFC: additional event for pm_notifier Sebastian Ott
2010-03-17 21:34 ` Rafael J. Wysocki
2010-03-18 9:13 ` Sebastian Ott
2010-03-18 11:37 ` Sebastian Ott
2010-03-18 20:19 ` Rafael J. Wysocki
2010-03-18 20:58 ` Rafael J. Wysocki
2010-03-19 8:40 ` Sebastian Ott [this message]
2010-03-26 19:25 ` Sebastian Ott
2010-03-26 21:31 ` Rafael J. Wysocki
2010-03-31 11:39 ` Sebastian Ott
2010-03-31 20:33 ` Rafael J. Wysocki
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=alpine.LFD.2.00.1003190938350.2478@localhost \
--to=sebott@linux.vnet.ibm.com \
--cc=linux-pm@lists.linux-foundation.org \
--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