On Fri, 2007-04-27 at 12:18 +0200, Rafael J. Wysocki wrote: > 1) We define platform_hibernation if CONFIG_ACPI is set. Let's just define it always then in the common code so we don't have even more magic bits platforms need to define even if they don't care at all. And please don't put #ifdef CONFIG_ACPI into the common code ;) Maybe #ifdef CONFIG_ARCH_NEEDS_HIBERNATE_HOOKS or something. > 2) In the ACPI code we do > > if (can do S4) > platform_hibernation = 1; Gotcha. > 3) We have functions arch_platform_prepare()/finish()/enter() that are defined > to be noops for anything but ACPI systems and for ACPI systems they are > defined like this: > > int arch_platform_enter(void) > { > if (!platform_hibernation) > return 0; > > ... > } > > I think it should work. You could reduce code churn in all other platforms by making these weak symbols like the irq hooks I did for pm_ops. It looks like it can work and possibly is even less intrusive than my hibernate_ops patch. Though then again my hibernate_ops patch removed a lot of stuff that is now no longer necessary, and also completely removed the PM_SUSPEND_DISK foo... we probably want that regardless of how we invoke ACPI. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part
- Follow-Ups:
- Re: suspend2 merge (was Re: [Suspend2-devel] Re: CFS and suspend2: hang in atomic copy)
- From: "Rafael J. Wysocki" <[email protected]>
- Re: suspend2 merge (was Re: [Suspend2-devel] Re: CFS and suspend2: hang in atomic copy)
- References:
- Re: suspend2 merge (was Re: [Suspend2-devel] Re: CFS and suspend2: hang in atomic copy)
- From: Pavel Machek <[email protected]>
- Re: suspend2 merge (was Re: [Suspend2-devel] Re: CFS and suspend2: hang in atomic copy)
- From: "Rafael J. Wysocki" <[email protected]>
- Re: suspend2 merge (was Re: [Suspend2-devel] Re: CFS and suspend2: hang in atomic copy)
- From: Johannes Berg <[email protected]>
- Re: suspend2 merge (was Re: [Suspend2-devel] Re: CFS and suspend2: hang in atomic copy)
- From: "Rafael J. Wysocki" <[email protected]>
- Re: suspend2 merge (was Re: [Suspend2-devel] Re: CFS and suspend2: hang in atomic copy)
- Prev by Date: Re: [ext3][kernels >= 2.6.20.7 at least] KDE going comatose when FS is under heavy write load (massive starvation)
- Next by Date: [PATCH] ACPI video: Don't export sysfs backlight interface if query _BCL fail
- Previous by thread: Re: suspend2 merge (was Re: [Suspend2-devel] Re: CFS and suspend2: hang in atomic copy)
- Next by thread: Re: suspend2 merge (was Re: [Suspend2-devel] Re: CFS and suspend2: hang in atomic copy)
- Index(es):