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)
commitf7b382b988233b5851eddf4531651ffe4133e88c
tree31447bb17cddd7cdcda6ec6d69c3a7cea6d00170
parentf97238373b8662a6d580e204df2e7bcbfa43e27a
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