Re: [PATCH 2/6] Hibernation: Move low level resume to disk.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, 27 of November 2007, Pavel Machek wrote:
> Hi!
> 
> > From: Rafael J. Wysocki <[email protected]>
> > 
> > Move the low level restore code to kernel/power/disk.c , since the
> > corresponding low level hibernation code is already there.
> > 
> > Make restore fail if device_power_down(PMSG_PRETHAW) returns an
> > error.
> > 
> > Signed-off-by: Rafael J. Wysocki <[email protected]>
> 
> Move looks ok to me.
> 
> 
> >  /**
> > + *	resume_target_kernel - prepare devices that need to be suspended with
> > + *	interrupts off, restore the contents of highmem that have not been
> > + *	restored yet from the image and run the low level code that will restore
> > + *	the remaining contents of memory and switch to the just restored target
> > + *	kernel.
> > + */
> > +
> > +static int resume_target_kernel(void)
> > +{
> > +	int error;
> > +
> > +	local_irq_disable();
> > +	error = device_power_down(PMSG_PRETHAW);
> > +	if (error) {
> > +		printk(KERN_ERR "Some devices failed to power down, "
> > +			KERN_ERR "aborting resume\n");
> > +		goto Enable_irqs;
> 
> Too many KERN_ERR's ;-)

Yeah, will fix.

> . Plus... are you sure this does the right 
> thing? ... .. ... yes, it does. If one device fails,
> device_power_down() powers up the rest using dpm_power_up(). Good.
> 
> ACK... modulo double KERN_ERR.

OK, thanks!

Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux