From: ebiederm@xmission.com (Eric W. Biederman)
To: Pavel Machek <pavel@ucw.cz>
Cc: Pierre Ossman <drzeus-list@drzeus.cx>,
ncunningham@cyclades.com, Meelis Roos <mroos@linux.ee>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Len Brown <len.brown@intel.com>
Subject: Re: reboot vs poweroff
Date: Thu, 01 Sep 2005 22:26:59 -0600 [thread overview]
Message-ID: <m11x48p018.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20050901202246.GB2027@openzaurus.ucw.cz> (Pavel Machek's message of "Thu, 1 Sep 2005 22:22:47 +0200")
Pavel Machek <pavel@ucw.cz> writes:
> Hi!
>>
>> 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?
Darn. You have a point there.
>> @@ -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?
Hmm. Good point. I hadn't considered that. I am now certain
it only exists when CONFIG_PM is set.
Thinking about it more I probably want to simply have a
kernel_power_off_shutdown(); common factor and call
that instead of device_shutdown().
Ok some sleep and then I will see if I can better version of this
cleanup.
Eric
next prev parent reply other threads:[~2005-09-02 4:28 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-29 0:17 Linux 2.6.13 Linus Torvalds
2005-08-29 0:43 ` Jesper Juhl
2005-08-29 3:05 ` Linus Torvalds
2005-08-29 10:57 ` Steven Rostedt
2005-08-29 12:17 ` Nigel Cunningham
2005-08-29 12:25 ` Jörn Engel
2005-08-29 12:28 ` Nigel Cunningham
2005-08-29 14:25 ` Antonino A. Daplas
2005-08-29 14:42 ` Steven Rostedt
2005-08-29 14:50 ` Linus Torvalds
2005-08-29 15:44 ` [PATCH] convert signal handling of NODEFER to act like other Unix boxes Steven Rostedt
2005-08-29 18:04 ` [PATCH] convert signal handling of NODEFER to act like other Unix boxes. [take2] Steven Rostedt
2005-08-29 12:19 ` Linux 2.6.13 Nigel Cunningham
2005-08-29 14:22 ` Roland Dreier
2005-09-01 6:24 ` reboot vs poweroff (was: Linux 2.6.13) Meelis Roos
2005-09-01 6:48 ` Nigel Cunningham
2005-09-01 7:33 ` Meelis Roos
2005-09-01 12:32 ` Pierre Ossman
2005-09-01 12:48 ` Nigel Cunningham
2005-09-01 15:15 ` Eric W. Biederman
2005-09-01 15:19 ` reboot vs poweroff Pierre Ossman
2005-09-01 17:00 ` Eric W. Biederman
2005-09-01 18:19 ` Pierre Ossman
2005-09-01 18:23 ` Eric W. Biederman
2005-09-01 21:11 ` Nigel Cunningham
2005-09-02 4:46 ` Eric W. Biederman
2005-09-01 20:22 ` Pavel Machek
2005-09-02 4:26 ` Eric W. Biederman [this message]
2005-09-01 21:09 ` reboot vs poweroff (was: Linux 2.6.13) Nigel Cunningham
2005-08-29 18:23 ` Oops in 2.6.13 (was Linux 2.6.13 ) Masoud Sharbiani
2005-08-29 20:13 ` Lee Revell
2005-08-30 3:47 ` Masoud Sharbiani
2005-08-30 22:41 ` Linux 2.6.13 Henrik Persson
2005-09-01 2:29 ` Greg KH
2005-09-03 9:22 ` Henrik Persson
2005-08-31 12:42 ` Alexandre Buisse
2005-09-01 18:23 reboot vs poweroff Brown, Len
2005-09-02 4:43 ` Eric W. Biederman
2005-09-10 21:07 ` Eric W. Biederman
2005-09-11 8:43 ` Meelis Roos
2005-09-11 8:53 ` Eric W. Biederman
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=m11x48p018.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=drzeus-list@drzeus.cx \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mroos@linux.ee \
--cc=ncunningham@cyclades.com \
--cc=pavel@ucw.cz \
/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
Powered by JetHome