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

Re: [PATCH] ppc32: Rework power management take #3



Le vendredi 03 juin 2005 à 08:17 +1000, Benjamin Herrenschmidt a écrit :

> On Thu, 2005-06-02 at 17:52 +0200, Stelian Pop wrote:
> 
> > Well, both issues seem to come from the same cause: post_freeze
> > (pmac_pm_post_freeze in arch/ppc/pmac_pm.c) is not called when resuming
> > from disk, only from mem. This has the effect that broadcast_wake() is
> > never called when resuming from disk, and this affects at least the
> > timer and the sound (and possibly other hardware, like serial etc).
> 
> Ah, good catch. That's more crap in the generic code where
> suspend-to-disk doesn't go through the "normal" process but instead
> bypasses everything and does it's own callback mecanism. Best is to fix
> the generic code here, broadcast_wake shouldn't be called while userland
> is still frozen.

Ok, I saw on linux-pm that you're working on it.

While you're rewriting the code, you may also be interested in fixing
this oops (it happens when trying to suspend to disk and
freeze_processes() fails. Then the code tries to resume the soundcard
which wasn't yet suspended, just notified (only PBOOK_SLEEP_REQUEST was
send and not PBOOK_SLEEP_NOW):

	Stopping tasks:
==========================================================================================================================
	 stopping tasks failed (1 tasks remaining)
	Restarting tasks...<6> Strange, pbbuttonsd not stopped
	 done
	adb: starting probe task...
	adb: finished probe task...
	Badness in enable_irq at kernel/irq/manage.c:108
	Call trace:
	 [c0007af0] dump_stack+0x18/0x28
	 [c0005914] check_bug_trap+0x84/0xac
	 [c0005a9c] ProgramCheckException+0x160/0x1a0
	 [c0004d7c] ret_from_except_full+0x0/0x4c
	 [c003d024] enable_irq+0xa0/0xa8
	 [c021f598] tumbler_resume+0xf0/0x184
	 [c021c040] snd_pmac_resume+0xd0/0xd4
	 [c021c090] snd_pmac_sleep_notify+0x4c/0x5c
	 [c040bc4c] broadcast_wake+0x3c/0x60
	 [c003c788] unprepare_processes+0x5c/0x60
	 [c003c850] pm_suspend_disk+0x34/0xc8
	 [c00398dc] enter_state+0xb0/0xb8
	 [c0039a2c] state_store+0xa0/0xbc
	 [c009e254] subsys_attr_store+0x44/0x4c
	 [c009e62c] flush_write_buffer+0x3c/0x4c
	Badness in enable_irq at kernel/irq/manage.c:108
	Call trace:
	 [c0007af0] dump_stack+0x18/0x28
	 [c0005914] check_bug_trap+0x84/0xac
	 [c0005a9c] ProgramCheckException+0x160/0x1a0
	 [c0004d7c] ret_from_except_full+0x0/0x4c
	 [c003d024] enable_irq+0xa0/0xa8
	 [c021bfe8] snd_pmac_resume+0x78/0xd4
	 [c021c090] snd_pmac_sleep_notify+0x4c/0x5c
	 [c040bc4c] broadcast_wake+0x3c/0x60
	 [c003c788] unprepare_processes+0x5c/0x60
	 [c003c850] pm_suspend_disk+0x34/0xc8
	 [c00398dc] enter_state+0xb0/0xb8
	 [c0039a2c] state_store+0xa0/0xbc
	 [c009e254] subsys_attr_store+0x44/0x4c
	 [c009e62c] flush_write_buffer+0x3c/0x4c
	 [c009e6ac] sysfs_write_file+0x70/0xe0
	Badness in enable_irq at kernel/irq/manage.c:108
	Call trace:
	 [c0007af0] dump_stack+0x18/0x28
	 [c0005914] check_bug_trap+0x84/0xac
	 [c0005a9c] ProgramCheckException+0x160/0x1a0
	 [c0004d7c] ret_from_except_full+0x0/0x4c
	 [c003d024] enable_irq+0xa0/0xa8
	 [c021bff8] snd_pmac_resume+0x88/0xd4
	 [c021c090] snd_pmac_sleep_notify+0x4c/0x5c
	 [c040bc4c] broadcast_wake+0x3c/0x60
	 [c003c788] unprepare_processes+0x5c/0x60
	 [c003c850] pm_suspend_disk+0x34/0xc8
	 [c00398dc] enter_state+0xb0/0xb8
	 [c0039a2c] state_store+0xa0/0xbc
	 [c009e254] subsys_attr_store+0x44/0x4c
	 [c009e62c] flush_write_buffer+0x3c/0x4c
	 [c009e6ac] sysfs_write_file+0x70/0xe0


-- 
Stelian Pop <stelian@popies.net>



Reply to: