diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/suspend.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'include/linux/suspend.h')
-rw-r--r-- | include/linux/suspend.h | 44 |
1 files changed, 12 insertions, 32 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 4af270ec2204..083ffea7ba18 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -122,7 +122,7 @@ struct platform_suspend_ops { | |||
122 | * suspend_set_ops - set platform dependent suspend operations | 122 | * suspend_set_ops - set platform dependent suspend operations |
123 | * @ops: The new suspend operations to set. | 123 | * @ops: The new suspend operations to set. |
124 | */ | 124 | */ |
125 | extern void suspend_set_ops(struct platform_suspend_ops *ops); | 125 | extern void suspend_set_ops(const struct platform_suspend_ops *ops); |
126 | extern int suspend_valid_only_mem(suspend_state_t state); | 126 | extern int suspend_valid_only_mem(suspend_state_t state); |
127 | 127 | ||
128 | /** | 128 | /** |
@@ -147,7 +147,7 @@ extern int pm_suspend(suspend_state_t state); | |||
147 | #else /* !CONFIG_SUSPEND */ | 147 | #else /* !CONFIG_SUSPEND */ |
148 | #define suspend_valid_only_mem NULL | 148 | #define suspend_valid_only_mem NULL |
149 | 149 | ||
150 | static inline void suspend_set_ops(struct platform_suspend_ops *ops) {} | 150 | static inline void suspend_set_ops(const struct platform_suspend_ops *ops) {} |
151 | static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; } | 151 | static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; } |
152 | #endif /* !CONFIG_SUSPEND */ | 152 | #endif /* !CONFIG_SUSPEND */ |
153 | 153 | ||
@@ -245,36 +245,21 @@ extern void swsusp_set_page_free(struct page *); | |||
245 | extern void swsusp_unset_page_free(struct page *); | 245 | extern void swsusp_unset_page_free(struct page *); |
246 | extern unsigned long get_safe_page(gfp_t gfp_mask); | 246 | extern unsigned long get_safe_page(gfp_t gfp_mask); |
247 | 247 | ||
248 | extern void hibernation_set_ops(struct platform_hibernation_ops *ops); | 248 | extern void hibernation_set_ops(const struct platform_hibernation_ops *ops); |
249 | extern int hibernate(void); | 249 | extern int hibernate(void); |
250 | extern bool system_entering_hibernation(void); | 250 | extern bool system_entering_hibernation(void); |
251 | #else /* CONFIG_HIBERNATION */ | 251 | #else /* CONFIG_HIBERNATION */ |
252 | static inline void register_nosave_region(unsigned long b, unsigned long e) {} | ||
253 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) {} | ||
252 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } | 254 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } |
253 | static inline void swsusp_set_page_free(struct page *p) {} | 255 | static inline void swsusp_set_page_free(struct page *p) {} |
254 | static inline void swsusp_unset_page_free(struct page *p) {} | 256 | static inline void swsusp_unset_page_free(struct page *p) {} |
255 | 257 | ||
256 | static inline void hibernation_set_ops(struct platform_hibernation_ops *ops) {} | 258 | static inline void hibernation_set_ops(const struct platform_hibernation_ops *ops) {} |
257 | static inline int hibernate(void) { return -ENOSYS; } | 259 | static inline int hibernate(void) { return -ENOSYS; } |
258 | static inline bool system_entering_hibernation(void) { return false; } | 260 | static inline bool system_entering_hibernation(void) { return false; } |
259 | #endif /* CONFIG_HIBERNATION */ | 261 | #endif /* CONFIG_HIBERNATION */ |
260 | 262 | ||
261 | #ifdef CONFIG_SUSPEND_NVS | ||
262 | extern int suspend_nvs_register(unsigned long start, unsigned long size); | ||
263 | extern int suspend_nvs_alloc(void); | ||
264 | extern void suspend_nvs_free(void); | ||
265 | extern void suspend_nvs_save(void); | ||
266 | extern void suspend_nvs_restore(void); | ||
267 | #else /* CONFIG_SUSPEND_NVS */ | ||
268 | static inline int suspend_nvs_register(unsigned long a, unsigned long b) | ||
269 | { | ||
270 | return 0; | ||
271 | } | ||
272 | static inline int suspend_nvs_alloc(void) { return 0; } | ||
273 | static inline void suspend_nvs_free(void) {} | ||
274 | static inline void suspend_nvs_save(void) {} | ||
275 | static inline void suspend_nvs_restore(void) {} | ||
276 | #endif /* CONFIG_SUSPEND_NVS */ | ||
277 | |||
278 | #ifdef CONFIG_PM_SLEEP | 263 | #ifdef CONFIG_PM_SLEEP |
279 | void save_processor_state(void); | 264 | void save_processor_state(void); |
280 | void restore_processor_state(void); | 265 | void restore_processor_state(void); |
@@ -292,9 +277,9 @@ extern int unregister_pm_notifier(struct notifier_block *nb); | |||
292 | /* drivers/base/power/wakeup.c */ | 277 | /* drivers/base/power/wakeup.c */ |
293 | extern bool events_check_enabled; | 278 | extern bool events_check_enabled; |
294 | 279 | ||
295 | extern bool pm_check_wakeup_events(void); | 280 | extern bool pm_wakeup_pending(void); |
296 | extern bool pm_get_wakeup_count(unsigned long *count); | 281 | extern bool pm_get_wakeup_count(unsigned int *count); |
297 | extern bool pm_save_wakeup_count(unsigned long count); | 282 | extern bool pm_save_wakeup_count(unsigned int count); |
298 | #else /* !CONFIG_PM_SLEEP */ | 283 | #else /* !CONFIG_PM_SLEEP */ |
299 | 284 | ||
300 | static inline int register_pm_notifier(struct notifier_block *nb) | 285 | static inline int register_pm_notifier(struct notifier_block *nb) |
@@ -308,18 +293,13 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) | |||
308 | } | 293 | } |
309 | 294 | ||
310 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) | 295 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) |
296 | |||
297 | static inline bool pm_wakeup_pending(void) { return false; } | ||
311 | #endif /* !CONFIG_PM_SLEEP */ | 298 | #endif /* !CONFIG_PM_SLEEP */ |
312 | 299 | ||
313 | extern struct mutex pm_mutex; | 300 | extern struct mutex pm_mutex; |
314 | 301 | ||
315 | #ifndef CONFIG_HIBERNATION | 302 | #ifndef CONFIG_HIBERNATE_CALLBACKS |
316 | static inline void register_nosave_region(unsigned long b, unsigned long e) | ||
317 | { | ||
318 | } | ||
319 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) | ||
320 | { | ||
321 | } | ||
322 | |||
323 | static inline void lock_system_sleep(void) {} | 303 | static inline void lock_system_sleep(void) {} |
324 | static inline void unlock_system_sleep(void) {} | 304 | static inline void unlock_system_sleep(void) {} |
325 | 305 | ||