diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/suspend.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 76f42e49b72d..46f3548aef2d 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
| @@ -386,4 +386,38 @@ static inline void unlock_system_sleep(void) | |||
| 386 | } | 386 | } |
| 387 | #endif | 387 | #endif |
| 388 | 388 | ||
| 389 | #ifdef CONFIG_ARCH_SAVE_PAGE_KEYS | ||
| 390 | /* | ||
| 391 | * The ARCH_SAVE_PAGE_KEYS functions can be used by an architecture | ||
| 392 | * to save/restore additional information to/from the array of page | ||
| 393 | * frame numbers in the hibernation image. For s390 this is used to | ||
| 394 | * save and restore the storage key for each page that is included | ||
| 395 | * in the hibernation image. | ||
| 396 | */ | ||
| 397 | unsigned long page_key_additional_pages(unsigned long pages); | ||
| 398 | int page_key_alloc(unsigned long pages); | ||
| 399 | void page_key_free(void); | ||
| 400 | void page_key_read(unsigned long *pfn); | ||
| 401 | void page_key_memorize(unsigned long *pfn); | ||
| 402 | void page_key_write(void *address); | ||
| 403 | |||
| 404 | #else /* !CONFIG_ARCH_SAVE_PAGE_KEYS */ | ||
| 405 | |||
| 406 | static inline unsigned long page_key_additional_pages(unsigned long pages) | ||
| 407 | { | ||
| 408 | return 0; | ||
| 409 | } | ||
| 410 | |||
| 411 | static inline int page_key_alloc(unsigned long pages) | ||
| 412 | { | ||
| 413 | return 0; | ||
| 414 | } | ||
| 415 | |||
| 416 | static inline void page_key_free(void) {} | ||
| 417 | static inline void page_key_read(unsigned long *pfn) {} | ||
| 418 | static inline void page_key_memorize(unsigned long *pfn) {} | ||
| 419 | static inline void page_key_write(void *address) {} | ||
| 420 | |||
| 421 | #endif /* !CONFIG_ARCH_SAVE_PAGE_KEYS */ | ||
| 422 | |||
| 389 | #endif /* _LINUX_SUSPEND_H */ | 423 | #endif /* _LINUX_SUSPEND_H */ |
