Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162727AbbKTSxP (ORCPT ); Fri, 20 Nov 2015 13:53:15 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:28211 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751727AbbKTSxN (ORCPT ); Fri, 20 Nov 2015 13:53:13 -0500 Subject: Re: [PATCH v2] clocksource: arm_global_timer: fix suspend resume To: Marc Zyngier , Grygorii Strashko , linux@arm.linux.org.uk, Daniel Lezcano , Thomas Gleixner , Srinivas Kandagatla , Maxime Coquelin References: <1448027861-21472-1-git-send-email-grygorii.strashko@ti.com> <564F570C.7030409@oracle.com> <564F67ED.9000905@ti.com> <564F6A92.7080006@arm.com> Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@stlinux.com, linux-omap@vger.kernel.org, Arnd Bergmann , John Stultz , Felipe Balbi , Tony Lindgren , Santosh Shilimkar From: santosh shilimkar Organization: Oracle Corporation Message-ID: <564F6BD0.3050804@oracle.com> Date: Fri, 20 Nov 2015 10:52:00 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <564F6A92.7080006@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2196 Lines: 57 On 11/20/2015 10:46 AM, Marc Zyngier wrote: > On 20/11/15 18:35, Grygorii Strashko wrote: >> Hi Santosh, >> >> On 11/20/2015 07:23 PM, santosh shilimkar wrote: >>> + Thomas, Marc >>> >>> On 11/20/2015 5:57 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 - SysRq are working, but >>>> nothing else. The reason of stall is that ARM Global timer loses its >>>> contexts. >>>> >>>> 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 >>>> - ensure clocksource and clockevent devices have coresponding flags >>>> (CLOCK_SOURCE_SUSPEND_NONSTOP and CLOCK_EVT_FEAT_C3STOP) set >>>> depending on presence of "always-on" DT property. >>>> >>> Something which loses context in low power states can't be >>> called "always-on" >> >> Sry, it's kinda new area for me and I could make mistakes. >> >> While working on this patch I've: >> - re-used implementation from ARM arch timer >> commit 82a5619410d4c4df65c04272db198eca5a867c18 >> Author: Lorenzo Pieralisi >> Date: Tue Apr 8 10:04:32 2014 +0100 >> >> clocksource: arch_arm_timer: Fix age-old arch timer C3STOP detection issue > > [...] > > This patch has a very specific purpose: instructing the core code that > this timer will never stop ticking, ever. It is really targeted at > virtual machines, whose timer is backed by the host timer, even when the > VM is not running. > > Using it on actual hardware is may not be the best idea, specially in > the presence of PM. > Exactly. Thanks for clarifying the commit Marc. Regards, Santosh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/