diff options
Diffstat (limited to 'kernel/power/snapshot.c')
-rw-r--r-- | kernel/power/snapshot.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 791a61892bb5..0c40c16174b4 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/compiler.h> | 30 | #include <linux/compiler.h> |
31 | #include <linux/ktime.h> | ||
31 | 32 | ||
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
33 | #include <asm/mmu_context.h> | 34 | #include <asm/mmu_context.h> |
@@ -1576,11 +1577,11 @@ int hibernate_preallocate_memory(void) | |||
1576 | struct zone *zone; | 1577 | struct zone *zone; |
1577 | unsigned long saveable, size, max_size, count, highmem, pages = 0; | 1578 | unsigned long saveable, size, max_size, count, highmem, pages = 0; |
1578 | unsigned long alloc, save_highmem, pages_highmem, avail_normal; | 1579 | unsigned long alloc, save_highmem, pages_highmem, avail_normal; |
1579 | struct timeval start, stop; | 1580 | ktime_t start, stop; |
1580 | int error; | 1581 | int error; |
1581 | 1582 | ||
1582 | printk(KERN_INFO "PM: Preallocating image memory... "); | 1583 | printk(KERN_INFO "PM: Preallocating image memory... "); |
1583 | do_gettimeofday(&start); | 1584 | start = ktime_get(); |
1584 | 1585 | ||
1585 | error = memory_bm_create(&orig_bm, GFP_IMAGE, PG_ANY); | 1586 | error = memory_bm_create(&orig_bm, GFP_IMAGE, PG_ANY); |
1586 | if (error) | 1587 | if (error) |
@@ -1709,9 +1710,9 @@ int hibernate_preallocate_memory(void) | |||
1709 | free_unnecessary_pages(); | 1710 | free_unnecessary_pages(); |
1710 | 1711 | ||
1711 | out: | 1712 | out: |
1712 | do_gettimeofday(&stop); | 1713 | stop = ktime_get(); |
1713 | printk(KERN_CONT "done (allocated %lu pages)\n", pages); | 1714 | printk(KERN_CONT "done (allocated %lu pages)\n", pages); |
1714 | swsusp_show_speed(&start, &stop, pages, "Allocated"); | 1715 | swsusp_show_speed(start, stop, pages, "Allocated"); |
1715 | 1716 | ||
1716 | return 0; | 1717 | return 0; |
1717 | 1718 | ||