From: Pavel Machek <pavel@ucw.cz>
To: Patrick Mochel <mochel@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Power Management Update
Date: Sun, 31 Aug 2003 23:28:14 +0200 [thread overview]
Message-ID: <20030831212813.GB122@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.33.0308301359570.944-100000@localhost.localdomain>
Hi!
> <mochel@osdl.org> (03/08/22 1.1276.19.8)
> [power] swsusp Cleanups
>
> - do_magic()
> - Rename to swsusp_arch_suspend().
> - Move declaration to swsusp.c
>
> - arch_prepare_suspend()
> - Return an int
> - Fix x86 version to return -EFAULT if cpu does not have pse, instead of
> calling panic().
> - Call from swsusp_save().
>
> - do_magic_suspend_1()
> - Move body to pm_suspend_disk()
> - Remove.
>
> - do_magic_suspend_2()
> - Rename to swsusp_suspend()
> - Move IRQ fiddling to suspend_save_image(), since that's the only call
> that needs it.
> - Return an int.
>
> - do_magic_resume_1()
> - Move body to pm_resume().
> - Remove
>
> - do_magic_resume_2()
> - Rename to swsusp_resume().
> - Return an int.
>
> - swsusp general
> - Remove unnecessary includes.
> - Remove suspend_pagedir_lock, since it was only used to disable IRQs.
> - Change swsusp_{suspend,resume} return an int, so pm_suspend_disk() knows
> if anything failed.
Gracious renames to make sure I can not orient in the code :-(.
-/* do_magic() is implemented in arch/?/kernel/suspend_asm.S, and
basically does:
+/* swsusp_arch_suspend() is implemented in arch/?/power/swsusp.S,
+ and basically does:
if (!resume) {
- do_magic_suspend_1();
save_processor_state();
SAVE_REGISTERS
- do_magic_suspend_2();
+ swsusp_suspend();
return;
}
GO_TO_SWAPPER_PAGE_TABLES
- do_magic_resume_1();
COPY_PAGES_BACK
RESTORE_REGISTERS
restore_processor_state();
- do_magic_resume_2();
+ swsusp_resume();
*/
do_magic_suspend_1() did disable interrupts, where do you disable them
now?
Did you test it with CONFIG_PREEMPT to hunt for "scheduling in atomic"
bugs?
Your new naming is even worse than my original (and that's quite an
achievement).
swsusp_write() does
swsusp_arch_suspend(), which in turn calls
swsusp_suspend()
^- and that does the writing.
Ouch. do_magic_* was clearer than *that*.
I do not see why you had to change to BIOs just now. Perhaps you
should get it into stable state, first, and then adding more code to
make it look 2.6-like is good idea?
[Will add more comments after a test].
Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
next prev parent reply other threads:[~2003-08-31 21:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-30 21:25 Power Management Update Patrick Mochel
2003-08-31 12:31 ` Felipe Alfaro Solana
2003-08-31 13:04 ` Mathieu LESNIAK
2003-09-02 18:13 ` Patrick Mochel
2003-09-02 23:50 ` Éric Brunet
2003-09-02 23:59 ` Patrick Mochel
2003-09-03 9:41 ` Mathieu LESNIAK
2003-09-03 22:41 ` Patrick Mochel
2003-09-04 9:34 ` Éric Brunet
2003-09-04 19:34 ` Patrick Mochel
[not found] ` <20031013194127.GA16791@lps.ens.fr>
2003-10-18 9:48 ` =?unknown-8bit?Q?=C9ric?= Brunet
2003-08-31 21:28 ` Pavel Machek [this message]
2003-08-31 22:15 ` Pavel Machek
2003-08-31 23:04 ` Power Managment Fix [was Re: Power Management Update] Pavel Machek
2003-09-01 10:57 Power Management Update Éric Brunet
[not found] <20030904224112.GA26556@lps.ens.fr>
[not found] ` <Pine.LNX.4.33.0309041637440.940-100000@localhost.localdomain>
2003-09-07 9:54 ` Éric Brunet
2003-09-08 19:54 ` Patrick Mochel
2003-09-09 10:53 ` Éric Brunet
2003-09-09 15:54 ` Patrick Mochel
2003-09-10 0:38 Patrick Mochel
2003-09-10 13:04 ` Daniele Venzano
2003-09-10 18:10 ` Pavel Machek
2003-09-11 4:45 ` Michael Frank
2003-09-11 6:06 ` CaT
2003-09-10 19:53 Subodh Shrivastava
2003-09-10 21:09 ` Patrick Mochel
2003-09-10 20:44 ` Subodh Shrivastava
2003-09-11 0:12 ` Greg KH
[not found] <3F5F9509.8080708@btopenworld.com>
2003-09-10 22:51 ` Patrick Mochel
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=20030831212813.GB122@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
/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;
as well as URLs for NNTP newsgroup(s).