PM: runtime: Fix timer_expires data type on 32-bit arches
authorGrygorii Strashko <grygorii.strashko@ti.com>
Fri, 18 Sep 2020 16:55:18 +0000 (19:55 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 28 Sep 2020 14:38:11 +0000 (16:38 +0200)
commit6b61d49a55796dbbc479eeb4465e59fd656c719c
tree343abccab032e78957781522b843f397b2bc2dbe
parentd12544fb2aa9944b180c35914031a8384ab082c1
PM: runtime: Fix timer_expires data type on 32-bit arches

Commit 8234f6734c5d ("PM-runtime: Switch autosuspend over to using
hrtimers") switched PM runtime autosuspend to use hrtimers and all
related time accounting in ns, but missed to update the timer_expires
data type in struct dev_pm_info to u64.

This causes the timer_expires value to be truncated on 32-bit
architectures when assignment is done from u64 values:

rpm_suspend()
|- dev->power.timer_expires = expires;

Fix it by changing the timer_expires type to u64.

Fixes: 8234f6734c5d ("PM-runtime: Switch autosuspend over to using hrtimers")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Cc: 5.0+ <stable@vger.kernel.org> # 5.0+
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/linux/pm.h