diff options
Diffstat (limited to 'kernel/power/power.h')
-rw-r--r-- | kernel/power/power.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h index 388dba680841..ea7132ed029b 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h | |||
@@ -37,21 +37,31 @@ extern struct subsystem power_subsys; | |||
37 | /* References to section boundaries */ | 37 | /* References to section boundaries */ |
38 | extern const void __nosave_begin, __nosave_end; | 38 | extern const void __nosave_begin, __nosave_end; |
39 | 39 | ||
40 | extern unsigned int nr_copy_pages; | ||
41 | extern struct pbe *pagedir_nosave; | 40 | extern struct pbe *pagedir_nosave; |
42 | 41 | ||
43 | /* Preferred image size in bytes (default 500 MB) */ | 42 | /* Preferred image size in bytes (default 500 MB) */ |
44 | extern unsigned long image_size; | 43 | extern unsigned long image_size; |
45 | 44 | ||
45 | extern int in_suspend; | ||
46 | |||
46 | extern asmlinkage int swsusp_arch_suspend(void); | 47 | extern asmlinkage int swsusp_arch_suspend(void); |
47 | extern asmlinkage int swsusp_arch_resume(void); | 48 | extern asmlinkage int swsusp_arch_resume(void); |
48 | 49 | ||
49 | extern unsigned int count_data_pages(void); | 50 | extern unsigned int count_data_pages(void); |
50 | extern void free_pagedir(struct pbe *pblist); | ||
51 | extern void release_eaten_pages(void); | ||
52 | extern struct pbe *alloc_pagedir(unsigned nr_pages, gfp_t gfp_mask, int safe_needed); | ||
53 | extern void swsusp_free(void); | 51 | extern void swsusp_free(void); |
54 | extern int alloc_data_pages(struct pbe *pblist, gfp_t gfp_mask, int safe_needed); | 52 | |
55 | extern unsigned int snapshot_nr_pages(void); | 53 | struct snapshot_handle { |
56 | extern struct pbe *snapshot_pblist(void); | 54 | loff_t offset; |
57 | extern void snapshot_pblist_set(struct pbe *pblist); | 55 | unsigned int page; |
56 | unsigned int page_offset; | ||
57 | unsigned int prev; | ||
58 | struct pbe *pbe; | ||
59 | void *buffer; | ||
60 | unsigned int buf_offset; | ||
61 | }; | ||
62 | |||
63 | #define data_of(handle) ((handle).buffer + (handle).buf_offset) | ||
64 | |||
65 | extern int snapshot_read_next(struct snapshot_handle *handle, size_t count); | ||
66 | extern int snapshot_write_next(struct snapshot_handle *handle, size_t count); | ||
67 | int snapshot_image_loaded(struct snapshot_handle *handle); | ||