Skip to content

Commit 6b61d49

Browse files
grygoriySrafaeljw
authored andcommitted
PM: runtime: Fix timer_expires data type on 32-bit arches
Commit 8234f67 ("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: 8234f67 ("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>
1 parent d12544f commit 6b61d49

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/linux/pm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ struct dev_pm_info {
590590
#endif
591591
#ifdef CONFIG_PM
592592
struct hrtimer suspend_timer;
593-
unsigned long timer_expires;
593+
u64 timer_expires;
594594
struct work_struct work;
595595
wait_queue_head_t wait_queue;
596596
struct wake_irq *wakeirq;

0 commit comments

Comments
 (0)