diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-11-18 01:23:34 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-11-18 01:23:34 +0100 |
commit | c68cfdc0a5879b4397dcfa837ba81a06039c2943 (patch) | |
tree | 1ed0119e430078094c0d15b0ffe686b7deb8a9ef /kernel/power/snapshot.c | |
parent | Linux 3.18-rc5 (diff) | |
parent | PM / Hibernate: Migrate to ktime_t (diff) | |
download | linux-c68cfdc0a5879b4397dcfa837ba81a06039c2943.tar.xz linux-c68cfdc0a5879b4397dcfa837ba81a06039c2943.zip |
Merge back 'pm-sleep' material for 3.19-rc1.
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 @@ #include <linux/list.h> #include <linux/slab.h> #include <linux/compiler.h> +#include <linux/ktime.h> #include <asm/uaccess.h> #include <asm/mmu_context.h> @@ -1576,11 +1577,11 @@ int hibernate_preallocate_memory(void) struct zone *zone; unsigned long saveable, size, max_size, count, highmem, pages = 0; unsigned long alloc, save_highmem, pages_highmem, avail_normal; - struct timeval start, stop; + ktime_t start, stop; int error; printk(KERN_INFO "PM: Preallocating image memory... "); - do_gettimeofday(&start); + start = ktime_get(); error = memory_bm_create(&orig_bm, GFP_IMAGE, PG_ANY); if (error) @@ -1709,9 +1710,9 @@ int hibernate_preallocate_memory(void) free_unnecessary_pages(); out: - do_gettimeofday(&stop); + stop = ktime_get(); printk(KERN_CONT "done (allocated %lu pages)\n", pages); - swsusp_show_speed(&start, &stop, pages, "Allocated"); + swsusp_show_speed(start, stop, pages, "Allocated"); return 0; |