From: Vincent Guittot <vincent.guittot@linaro.org>
To: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
"open list:THERMAL" <linux-pm@vger.kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pm: runtime: fix timer_expires on 32bits arch
Date: Mon, 21 Sep 2020 08:51:02 +0200 [thread overview]
Message-ID: <CAKfTPtApNLAYq-=UcD6bM8nhT3pp3DSp2bCxFsTF3AZKs6Qz3g@mail.gmail.com> (raw)
In-Reply-To: <20200918165518.23246-1-grygorii.strashko@ti.com>
On Fri, 18 Sep 2020 at 18:55, Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
>
> 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>
Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
> 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 prev parent reply other threads:[~2020-09-21 6:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-18 16:55 [PATCH] pm: runtime: fix timer_expires on 32bits arch Grygorii Strashko
2020-09-18 20:56 ` Pavel Machek
2020-09-21 6:51 ` Vincent Guittot [this message]
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='CAKfTPtApNLAYq-=UcD6bM8nhT3pp3DSp2bCxFsTF3AZKs6Qz3g@mail.gmail.com' \
--to=vincent.guittot@linaro.org \
--cc=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 \
/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;
as well as URLs for NNTP newsgroup(s).