Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f531583 authored by Grygorii Strashko's avatar Grygorii Strashko Committed by Greg Kroah-Hartman
Browse files

PM: runtime: Fix timer_expires data type on 32-bit arches



commit 6b61d49a55796dbbc479eeb4465e59fd656c719c upstream.

Commit 8234f673 ("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: 8234f673 ("PM-runtime: Switch autosuspend over to using hrtimers")
Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Acked-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
Cc: 5.0+ <stable@vger.kernel.org> # 5.0+
[ rjw: Subject and changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 870d910e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -598,7 +598,7 @@ struct dev_pm_info {
#endif
#ifdef CONFIG_PM
	struct hrtimer		suspend_timer;
	unsigned long		timer_expires;
	u64			timer_expires;
	struct work_struct	work;
	wait_queue_head_t	wait_queue;
	struct wake_irq		*wakeirq;