diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-12 16:17:27 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-12 16:17:27 -0400 |
| commit | 947ec0b0c1e7e80eef4fe64f7763a06d0cf04d2e (patch) | |
| tree | 29547b6975d58c3b252f08dc6c2dbda3b9adfa88 /include | |
| parent | c53567ad4528b6efefc3fc22a354d20f6226a098 (diff) | |
| parent | 5818a6e2519b34cd6d0220d89f5729ab2725e1bf (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
PM: Add empty suspend/resume device irq functions
PM/Hibernate: Move NVS routines into a seperate file (v2).
PM/Hibernate: Rename disk.c to hibernate.c
PM: Separate suspend to RAM functionality from core
Driver Core: Rework platform suspend/resume, print warning
PM: Remove device_type suspend()/resume()
PM/Hibernate: Move memory shrinking to snapshot.c (rev. 2)
PM/Suspend: Do not shrink memory before suspend
PM: Remove bus_type suspend_late()/resume_early() V2
PM core: rename suspend and resume functions
PM: Rename device_power_down/up()
PM: Remove unused asm/suspend.h
x86: unify power/cpu_(32|64).c
x86: unify power/cpu_(32|64) copyright notes
x86: unify power/cpu_(32|64) regarding restoring processor state
x86: unify power/cpu_(32|64) regarding saving processor state
x86: unify power/cpu_(32|64) global variables
x86: unify power/cpu_(32|64) headers
PM: Warn if interrupts are enabled during suspend-resume of sysdevs
PM/ACPI/x86: Fix sparse warning in arch/x86/kernel/acpi/sleep.c
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/device.h | 5 | ||||
| -rw-r--r-- | include/linux/interrupt.h | 6 | ||||
| -rw-r--r-- | include/linux/pm.h | 11 | ||||
| -rw-r--r-- | include/linux/suspend.h | 18 |
4 files changed, 22 insertions, 18 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 5d5c197bad45..a4a7b10aaa48 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -62,8 +62,6 @@ struct bus_type { | |||
| 62 | void (*shutdown)(struct device *dev); | 62 | void (*shutdown)(struct device *dev); |
| 63 | 63 | ||
| 64 | int (*suspend)(struct device *dev, pm_message_t state); | 64 | int (*suspend)(struct device *dev, pm_message_t state); |
| 65 | int (*suspend_late)(struct device *dev, pm_message_t state); | ||
| 66 | int (*resume_early)(struct device *dev); | ||
| 67 | int (*resume)(struct device *dev); | 65 | int (*resume)(struct device *dev); |
| 68 | 66 | ||
| 69 | struct dev_pm_ops *pm; | 67 | struct dev_pm_ops *pm; |
| @@ -291,9 +289,6 @@ struct device_type { | |||
| 291 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); | 289 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); |
| 292 | void (*release)(struct device *dev); | 290 | void (*release)(struct device *dev); |
| 293 | 291 | ||
| 294 | int (*suspend)(struct device *dev, pm_message_t state); | ||
| 295 | int (*resume)(struct device *dev); | ||
| 296 | |||
| 297 | struct dev_pm_ops *pm; | 292 | struct dev_pm_ops *pm; |
| 298 | }; | 293 | }; |
| 299 | 294 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index ff374ceface0..c41e812e9d5e 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -183,6 +183,7 @@ extern void disable_irq(unsigned int irq); | |||
| 183 | extern void enable_irq(unsigned int irq); | 183 | extern void enable_irq(unsigned int irq); |
| 184 | 184 | ||
| 185 | /* The following three functions are for the core kernel use only. */ | 185 | /* The following three functions are for the core kernel use only. */ |
| 186 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
| 186 | extern void suspend_device_irqs(void); | 187 | extern void suspend_device_irqs(void); |
| 187 | extern void resume_device_irqs(void); | 188 | extern void resume_device_irqs(void); |
| 188 | #ifdef CONFIG_PM_SLEEP | 189 | #ifdef CONFIG_PM_SLEEP |
| @@ -190,6 +191,11 @@ extern int check_wakeup_irqs(void); | |||
| 190 | #else | 191 | #else |
| 191 | static inline int check_wakeup_irqs(void) { return 0; } | 192 | static inline int check_wakeup_irqs(void) { return 0; } |
| 192 | #endif | 193 | #endif |
| 194 | #else | ||
| 195 | static inline void suspend_device_irqs(void) { }; | ||
| 196 | static inline void resume_device_irqs(void) { }; | ||
| 197 | static inline int check_wakeup_irqs(void) { return 0; } | ||
| 198 | #endif | ||
| 193 | 199 | ||
| 194 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS) | 200 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS) |
| 195 | 201 | ||
diff --git a/include/linux/pm.h b/include/linux/pm.h index 1d4e2d289821..b3f74764a586 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
| @@ -382,14 +382,13 @@ struct dev_pm_info { | |||
| 382 | #ifdef CONFIG_PM_SLEEP | 382 | #ifdef CONFIG_PM_SLEEP |
| 383 | extern void device_pm_lock(void); | 383 | extern void device_pm_lock(void); |
| 384 | extern int sysdev_resume(void); | 384 | extern int sysdev_resume(void); |
| 385 | extern void device_power_up(pm_message_t state); | 385 | extern void dpm_resume_noirq(pm_message_t state); |
| 386 | extern void device_resume(pm_message_t state); | 386 | extern void dpm_resume_end(pm_message_t state); |
| 387 | 387 | ||
| 388 | extern void device_pm_unlock(void); | 388 | extern void device_pm_unlock(void); |
| 389 | extern int sysdev_suspend(pm_message_t state); | 389 | extern int sysdev_suspend(pm_message_t state); |
| 390 | extern int device_power_down(pm_message_t state); | 390 | extern int dpm_suspend_noirq(pm_message_t state); |
| 391 | extern int device_suspend(pm_message_t state); | 391 | extern int dpm_suspend_start(pm_message_t state); |
| 392 | extern int device_prepare_suspend(pm_message_t state); | ||
| 393 | 392 | ||
| 394 | extern void __suspend_report_result(const char *function, void *fn, int ret); | 393 | extern void __suspend_report_result(const char *function, void *fn, int ret); |
| 395 | 394 | ||
| @@ -403,7 +402,7 @@ extern void __suspend_report_result(const char *function, void *fn, int ret); | |||
| 403 | #define device_pm_lock() do {} while (0) | 402 | #define device_pm_lock() do {} while (0) |
| 404 | #define device_pm_unlock() do {} while (0) | 403 | #define device_pm_unlock() do {} while (0) |
| 405 | 404 | ||
| 406 | static inline int device_suspend(pm_message_t state) | 405 | static inline int dpm_suspend_start(pm_message_t state) |
| 407 | { | 406 | { |
| 408 | return 0; | 407 | return 0; |
| 409 | } | 408 | } |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 795032edfc46..cd15df6c63cd 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
| @@ -245,11 +245,6 @@ extern unsigned long get_safe_page(gfp_t gfp_mask); | |||
| 245 | 245 | ||
| 246 | extern void hibernation_set_ops(struct platform_hibernation_ops *ops); | 246 | extern void hibernation_set_ops(struct platform_hibernation_ops *ops); |
| 247 | extern int hibernate(void); | 247 | extern int hibernate(void); |
| 248 | extern int hibernate_nvs_register(unsigned long start, unsigned long size); | ||
| 249 | extern int hibernate_nvs_alloc(void); | ||
| 250 | extern void hibernate_nvs_free(void); | ||
| 251 | extern void hibernate_nvs_save(void); | ||
| 252 | extern void hibernate_nvs_restore(void); | ||
| 253 | extern bool system_entering_hibernation(void); | 248 | extern bool system_entering_hibernation(void); |
| 254 | #else /* CONFIG_HIBERNATION */ | 249 | #else /* CONFIG_HIBERNATION */ |
| 255 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } | 250 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } |
| @@ -258,6 +253,16 @@ static inline void swsusp_unset_page_free(struct page *p) {} | |||
| 258 | 253 | ||
| 259 | static inline void hibernation_set_ops(struct platform_hibernation_ops *ops) {} | 254 | static inline void hibernation_set_ops(struct platform_hibernation_ops *ops) {} |
| 260 | static inline int hibernate(void) { return -ENOSYS; } | 255 | static inline int hibernate(void) { return -ENOSYS; } |
| 256 | static inline bool system_entering_hibernation(void) { return false; } | ||
| 257 | #endif /* CONFIG_HIBERNATION */ | ||
| 258 | |||
| 259 | #ifdef CONFIG_HIBERNATION_NVS | ||
| 260 | extern int hibernate_nvs_register(unsigned long start, unsigned long size); | ||
| 261 | extern int hibernate_nvs_alloc(void); | ||
| 262 | extern void hibernate_nvs_free(void); | ||
| 263 | extern void hibernate_nvs_save(void); | ||
| 264 | extern void hibernate_nvs_restore(void); | ||
| 265 | #else /* CONFIG_HIBERNATION_NVS */ | ||
| 261 | static inline int hibernate_nvs_register(unsigned long a, unsigned long b) | 266 | static inline int hibernate_nvs_register(unsigned long a, unsigned long b) |
| 262 | { | 267 | { |
| 263 | return 0; | 268 | return 0; |
| @@ -266,8 +271,7 @@ static inline int hibernate_nvs_alloc(void) { return 0; } | |||
| 266 | static inline void hibernate_nvs_free(void) {} | 271 | static inline void hibernate_nvs_free(void) {} |
| 267 | static inline void hibernate_nvs_save(void) {} | 272 | static inline void hibernate_nvs_save(void) {} |
| 268 | static inline void hibernate_nvs_restore(void) {} | 273 | static inline void hibernate_nvs_restore(void) {} |
| 269 | static inline bool system_entering_hibernation(void) { return false; } | 274 | #endif /* CONFIG_HIBERNATION_NVS */ |
| 270 | #endif /* CONFIG_HIBERNATION */ | ||
| 271 | 275 | ||
| 272 | #ifdef CONFIG_PM_SLEEP | 276 | #ifdef CONFIG_PM_SLEEP |
| 273 | void save_processor_state(void); | 277 | void save_processor_state(void); |
