linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: grygorii.strashko@ti.com (Grygorii Strashko)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] clocksource: arm_global_timer: fix suspend resume
Date: Mon, 30 Nov 2015 13:51:46 +0200	[thread overview]
Message-ID: <565C3852.4000605@ti.com> (raw)
In-Reply-To: <565B9869.10800@oracle.com>

On 11/30/2015 02:29 AM, santosh.shilimkar at oracle.com wrote:
> 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>

Sure, I'll update.

Thanks.
-- 
regards,
-grygorii

      reply	other threads:[~2015-11-30 11:51 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 at oracle.com
2015-11-30 11:51   ` Grygorii Strashko [this message]

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=565C3852.4000605@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=linux-arm-kernel@lists.infradead.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).