From: Grygorii Strashko <grygorii.strashko@ti.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
<linux-pm@vger.kernel.org>, Ulf Hansson <ulf.hansson@linaro.org>,
Vincent Guittot <vincent.guittot@linaro.org>
Cc: Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
<linux-kernel@vger.kernel.org>,
Grygorii Strashko <grygorii.strashko@ti.com>
Subject: [PATCH] pm: runtime: fix timer_expires on 32bits arch
Date: Fri, 18 Sep 2020 19:55:18 +0300 [thread overview]
Message-ID: <20200918165518.23246-1-grygorii.strashko@ti.com> (raw)
The 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 update the struct
dev_pm_info->timer_expires to u64. This causes timer_expires value to be
truncated on 32bits architectures when assignment is done from u64 values:
rpm_suspend()
|- dev->power.timer_expires = expires;
Hence, fix it by changing timer_expires type to u64.
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Fixes: 8234f6734c5d ("PM-runtime: Switch autosuspend over to using hrtimers")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
include/linux/pm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/pm.h b/include/linux/pm.h
index a30a4b54df52..47aca6bac1d6 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -590,7 +590,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;
--
2.17.1
next reply other threads:[~2020-09-18 16:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-18 16:55 Grygorii Strashko [this message]
2020-09-18 20:56 ` Pavel Machek
2020-09-21 6:51 ` Vincent Guittot
2020-09-21 14:15 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200918165518.23246-1-grygorii.strashko@ti.com \
--to=grygorii.strashko@ti.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=ulf.hansson@linaro.org \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®