From: "santosh.shilimkar@oracle.com" <santosh.shilimkar@oracle.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>,
Russell King <linux@arm.linux.org.uk>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Srinivas Kandagatla <srinivas.kandagatla@gmail.com>,
Maxime Coquelin <maxime.coquelin@st.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, kernel@stlinux.com,
linux-omap@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
John Stultz <john.stultz@linaro.org>, Felipe Balbi <balbi@ti.com>,
Tony Lindgren <tony@atomide.com>,
Santosh Shilimkar <ssantosh@kernel.org>,
Marc Zyngier <marc.zyngier@arm.com>
Subject: Re: [PATCH v3] clocksource: arm_global_timer: fix suspend resume
Date: Sun, 29 Nov 2015 16:29:29 -0800 [thread overview]
Message-ID: <565B9869.10800@oracle.com> (raw)
In-Reply-To: <1448653624-25006-1-git-send-email-grygorii.strashko@ti.com>
On 11/27/15 11:47 AM, Grygorii Strashko wrote:
> Now the System stall is observed on TI AM437x based board
> (am437x-gp-evm) during resuming from System suspend when ARM Global
> timer is selected as clocksource device (CPUIdle not enabled) - SysRq are working,
> but nothing else.
>
> The reason of stall is that ARM Global timer loses its contexts during
> System suspend:
> GT_CONTROL.TIMER_ENABLE = 0 (unbanked)
> GT_COUNTERx = 0
>
> Hence, update ARM Global timer driver to reflect above behaviour
> - re-enable ARM Global timer on resume GT_CONTROL.TIMER_ENABLE = 1.
>
> CC: Arnd Bergmann <arnd@arndb.de>
> Cc: John Stultz <john.stultz@linaro.org>
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Santosh Shilimkar <ssantosh@kernel.org>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> ---
> Changes in v3:
> - dropped all DT specific code
> Changes in v2:
> - suspend/resume simplified: nothing is stored any more and
> ARM GT just re-enabled
> Link on v2:
> https://lkml.org/lkml/2015/11/20/355
> Link on v1:
> https://lkml.org/lkml/2015/11/13/456
>
Looks reasonable to me.
> drivers/clocksource/arm_global_timer.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c
> index a2cb6fa..10d1417 100644
> --- a/drivers/clocksource/arm_global_timer.c
> +++ b/drivers/clocksource/arm_global_timer.c
> @@ -195,12 +195,19 @@ static cycle_t gt_clocksource_read(struct clocksource *cs)
> return gt_counter_read();
> }
>
> +static void gt_resume(struct clocksource *cs)
> +{
> + /* re-enable timer on resume */
> + writel(GT_CONTROL_TIMER_ENABLE, gt_base + GT_CONTROL);
Check if its disabled before enabling it.
Other than that,
Reviewed-by: Santosh Shilimkar <ssantosh@kernel.org>
next prev parent reply other threads:[~2015-11-30 0:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 19:47 [PATCH v3] clocksource: arm_global_timer: fix suspend resume Grygorii Strashko
2015-11-30 0:29 ` santosh.shilimkar [this message]
2015-11-30 11:51 ` Grygorii Strashko
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=565B9869.10800@oracle.com \
--to=santosh.shilimkar@oracle.com \
--cc=arnd@arndb.de \
--cc=balbi@ti.com \
--cc=daniel.lezcano@linaro.org \
--cc=grygorii.strashko@ti.com \
--cc=john.stultz@linaro.org \
--cc=kernel@stlinux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=marc.zyngier@arm.com \
--cc=maxime.coquelin@st.com \
--cc=srinivas.kandagatla@gmail.com \
--cc=ssantosh@kernel.org \
--cc=tglx@linutronix.de \
--cc=tony@atomide.com \
/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).