Re: Power Management Update
From: Pavel Machek (pavel_at_ucw.cz)
Date: 08/31/03
- Previous message: Alan Cox: "Re: Re: Re: IDE DMA breakage w/ 2.4.21+ and 2.6.0-test4(-mm4)"
- In reply to: Patrick Mochel: "Power Management Update"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 31 Aug 2003 23:28:14 +0200 To: Patrick Mochel <mochel@osdl.org>
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?] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Alan Cox: "Re: Re: Re: IDE DMA breakage w/ 2.4.21+ and 2.6.0-test4(-mm4)"
- In reply to: Patrick Mochel: "Power Management Update"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|