[linux-pm] [RFC PATCH v3] ARM hibernation/suspend-to-disk support

Frank Hofmann frank.hofmann at tomtom.com
Tue Jun 14 01:00:12 PDT 2011



On Fri, 3 Jun 2011, Pavel Machek wrote:

> Hi!
>
>> Please let me know what you think,
>> Thanks in advance,
>
>> +void save_processor_state(void)
>> +{
>> +	flush_thread();
>> +	local_fiq_disable();
>> +#ifdef CONFIG_ARM_MACH_HIBERNATION_HOOK
>> +	mach_save_state();
>> +#endif
>> +}
>
> Could we always define mach_save_state, and get rid of ifdef?

Yes ... but it addresses only part of the issue(s). There's some state 
which cannot be saved / restored separately from the core state that's 
dealt with inside swsusp_arch_suspend/resume. This hook couldn't deal with 
that.

Also, if having mach-specific hooks everywhere, wouldn't it be better to 
simply use a platform ops based approach ?

FrankH.



>
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
>


More information about the linux-pm mailing list