[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1218101592.5164.43.camel@caritas-dev.intel.com>
Date: Thu, 07 Aug 2008 17:33:12 +0800
From: Huang Ying <ying.huang@...el.com>
To: Pavel Machek <pavel@...e.cz>
Cc: "Eric W. Biederman" <ebiederm@...ssion.com>,
nigel@...el.suspend2.net, "Rafael J. Wysocki" <rjw@...k.pl>,
Andrew Morton <akpm@...ux-foundation.org>,
Vivek Goyal <vgoyal@...hat.com>, mingo@...e.hu,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org,
Kexec Mailing List <kexec@...ts.infradead.org>
Subject: Re: [PATCH 4/6] kexec jump: in sync with hibernation implementation
On Thu, 2008-08-07 at 11:22 +0200, Pavel Machek wrote:
> > Add device_pm_lock() and device_pm_unlock() in kernel_kexec() to be
> > in sync with current hibernation implementation.
> >
> > Signed-off-by: Huang Ying <ying.huang@...el.com>
> >
> > ---
> > kernel/kexec.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > --- a/kernel/kexec.c
> > +++ b/kernel/kexec.c
> > @@ -1457,6 +1457,7 @@ int kernel_kexec(void)
> > error = disable_nonboot_cpus();
> > if (error)
> > goto Resume_devices;
> > + device_pm_lock();
> > local_irq_disable();
> > /* At this point, device_suspend() has been called,
> > * but *not* device_power_down(). We *must*
> > @@ -1485,6 +1486,7 @@ int kernel_kexec(void)
> > device_power_up(PMSG_RESTORE);
> > Enable_irqs:
> > local_irq_enable();
> > + device_pm_unlock();
> > enable_nonboot_cpus();
> > Resume_devices:
> > device_resume(PMSG_RESTORE);
> >
>
> Would it be possible to create common function for hibernation and
> kexec? Keeping complex stuff like this in sync is ugly.
Yes, it is ugly. But it is a little difficult to do that. Hibernation
one is more complex than this one.
Best Regards,
Huang Ying
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists