diff options
Diffstat (limited to 'kernel/power/power.h')
-rw-r--r-- | kernel/power/power.h | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h index a64d3f22de97..a3e47cbdaf31 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h | |||
@@ -143,30 +143,9 @@ struct resume_swap_area { | |||
143 | /* If unset, the snapshot device cannot be open. */ | 143 | /* If unset, the snapshot device cannot be open. */ |
144 | extern atomic_t snapshot_device_available; | 144 | extern atomic_t snapshot_device_available; |
145 | 145 | ||
146 | /** | 146 | extern sector_t alloc_swapdev_block(int swap); |
147 | * The bitmap is used for tracing allocated swap pages | 147 | extern void free_all_swap_pages(int swap); |
148 | * | 148 | extern int swsusp_swap_in_use(void); |
149 | * The entire bitmap consists of a number of bitmap_page | ||
150 | * structures linked with the help of the .next member. | ||
151 | * Thus each page can be allocated individually, so we only | ||
152 | * need to make 0-order memory allocations to create | ||
153 | * the bitmap. | ||
154 | */ | ||
155 | |||
156 | #define BITMAP_PAGE_SIZE (PAGE_SIZE - sizeof(void *)) | ||
157 | #define BITMAP_PAGE_CHUNKS (BITMAP_PAGE_SIZE / sizeof(long)) | ||
158 | #define BITS_PER_CHUNK (sizeof(long) * 8) | ||
159 | #define BITMAP_PAGE_BITS (BITMAP_PAGE_CHUNKS * BITS_PER_CHUNK) | ||
160 | |||
161 | struct bitmap_page { | ||
162 | unsigned long chunks[BITMAP_PAGE_CHUNKS]; | ||
163 | struct bitmap_page *next; | ||
164 | }; | ||
165 | |||
166 | extern void free_bitmap(struct bitmap_page *bitmap); | ||
167 | extern struct bitmap_page *alloc_bitmap(unsigned int nr_bits); | ||
168 | extern sector_t alloc_swapdev_block(int swap, struct bitmap_page *bitmap); | ||
169 | extern void free_all_swap_pages(int swap, struct bitmap_page *bitmap); | ||
170 | 149 | ||
171 | extern int swsusp_check(void); | 150 | extern int swsusp_check(void); |
172 | extern int swsusp_shrink_memory(void); | 151 | extern int swsusp_shrink_memory(void); |