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.h27
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. */
144extern atomic_t snapshot_device_available; 144extern atomic_t snapshot_device_available;
145 145
146/** 146extern sector_t alloc_swapdev_block(int swap);
147 * The bitmap is used for tracing allocated swap pages 147extern void free_all_swap_pages(int swap);
148 * 148extern 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
161struct bitmap_page {
162 unsigned long chunks[BITMAP_PAGE_CHUNKS];
163 struct bitmap_page *next;
164};
165
166extern void free_bitmap(struct bitmap_page *bitmap);
167extern struct bitmap_page *alloc_bitmap(unsigned int nr_bits);
168extern sector_t alloc_swapdev_block(int swap, struct bitmap_page *bitmap);
169extern void free_all_swap_pages(int swap, struct bitmap_page *bitmap);
170 149
171extern int swsusp_check(void); 150extern int swsusp_check(void);
172extern int swsusp_shrink_memory(void); 151extern int swsusp_shrink_memory(void);