Re: reboot vs poweroff

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

 



Hi!

> >>Hmm.  Looking at that bug report it specifies 2.6.11.  Does this
> >>problem really happen in 2.6.13?
> >>
> >>  
> >>
> >
> > I first noticed it in 2.6.11. It was fixed sometime during 2.6.13-rc
> > only to be killed of again in 2.6.13-rc7. The bugzilla now has a patch
> > for 2.6.13 which fixes the problem again.
> 
> Thanks.
> 
> This is clearly a code path I missed when I was fixing things.
> 
> When I made the final acpi change I checked for any other users
> of device_suspend and it seems I was blind and missed this one.
> Looking again...
> 
> The patch in the bug report looks correct.  However it is still
> a little incomplete.  In particular the reboot notifier is not
> being called, and since not everything has been converted into
> using shutdown methods that could lead to some other inconsistent
> behavior.
> 
> Does anyone have any problems with the patch below?
> If not I will send this off to Linus..

Yes. kernel_suspend is *way* too generic name.  kernel_suspend_off? kernel_powe_off_suspend?

> @@ -420,6 +421,15 @@ void kernel_power_off(void)
>  }
>  EXPORT_SYMBOL_GPL(kernel_power_off);
>  
> +int kernel_suspend(void)
> +{
> +	notifier_call_chain(&reboot_notifier_list, SYS_POWER_OFF, NULL);
> +	system_state = SYSTEM_POWER_OFF;
> +	device_shutdown();
> +	return pm_ops->enter(PM_SUSPEND_DISK);
> +}
> +EXPORT_SYMBOL_GPL(kernel_suspend);
> +

Are you sure pm_ops exists in !CONFIG_PM case?
-- 
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms         

-
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]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux