aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/power.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/power.h')
-rw-r--r--kernel/power/power.h26
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 */
38extern const void __nosave_begin, __nosave_end; 38extern const void __nosave_begin, __nosave_end;
39 39
40extern unsigned int nr_copy_pages;
41extern struct pbe *pagedir_nosave; 40extern struct pbe *pagedir_nosave;
42 41
43/* Preferred image size in bytes (default 500 MB) */ 42/* Preferred image size in bytes (default 500 MB) */
44extern unsigned long image_size; 43extern unsigned long image_size;
45 44
45extern int in_suspend;
46
46extern asmlinkage int swsusp_arch_suspend(void); 47extern asmlinkage int swsusp_arch_suspend(void);
47extern asmlinkage int swsusp_arch_resume(void); 48extern asmlinkage int swsusp_arch_resume(void);
48 49
49extern unsigned int count_data_pages(void); 50extern unsigned int count_data_pages(void);
50extern void free_pagedir(struct pbe *pblist);
51extern void release_eaten_pages(void);
52extern struct pbe *alloc_pagedir(unsigned nr_pages, gfp_t gfp_mask, int safe_needed);
53extern void swsusp_free(void); 51extern void swsusp_free(void);
54extern int alloc_data_pages(struct pbe *pblist, gfp_t gfp_mask, int safe_needed); 52
55extern unsigned int snapshot_nr_pages(void); 53struct snapshot_handle {
56extern struct pbe *snapshot_pblist(void); 54 loff_t offset;
57extern 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
65extern int snapshot_read_next(struct snapshot_handle *handle, size_t count);
66extern int snapshot_write_next(struct snapshot_handle *handle, size_t count);
67int snapshot_image_loaded(struct snapshot_handle *handle);