]> git.baikalelectronics.ru Git - kernel.git/commit
PM/freezer: y2038, use boottime to compare tstamps
authorAbhilash Jindal <klock.android@gmail.com>
Sun, 31 Jan 2016 19:29:01 +0000 (14:29 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 11 Feb 2016 10:10:43 +0000 (11:10 +0100)
commitb3b866cfe860ea8fe853faed0be0747e47bbcc3d
tree31447bb17cddd7cdcda6ec6d69c3a7cea6d00170
parent1a115870d0d01f1f6f227e848b9150a4ba4e2577
PM/freezer: y2038, use boottime to compare tstamps

Wall time obtained from do_gettimeofday gives 32 bit timeval which can only
represent time until January 2038. This patch moves to ktime_t, a 64-bit time.

Also, wall time is susceptible to sudden jumps due to user setting the time or
due to NTP.  Boot time is constantly increasing time better suited for
subtracting two timestamps.

Signed-off-by: Abhilash Jindal <klock.android@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/process.c