Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1388722imm; Tue, 15 May 2018 19:21:54 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpo8rJPutGoAddXy1mPxSp21Djg0hr+TliBB25ThYeIaJBOPsT10Wcl6hw2+sioGh7yNXT8 X-Received: by 2002:a65:56cb:: with SMTP id w11-v6mr14028925pgs.175.1526437314197; Tue, 15 May 2018 19:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526437314; cv=none; d=google.com; s=arc-20160816; b=AZ8ieMimkFPXyz+lQimLzZdxprtRq62RfGQblvzfaofmyrG3SCxxqLQNgk+bqATRWX SXACF5o0jjavc3ostfzTQI29MbBkhMlfDOJQ2gddpHyUbUq6GTSn3qnQFK4G16JPTsqM KB1iRl716Y2Ql69rVRausUSinsagQ4MNcNpGYQUHKN9els4iRup1M+g+LOt8DJ+MGOzd Vf2w79soIrtHK+/Qehui4HrQjRUKEi7onFh6O60+2vC8CL7nc3f5wDraHR4dEiJYCEu/ av245Hk1e2fU7fIvFD0QgFcLoLUb9EdIjZssMaMACs6cIC7f/TLnNJeWcTe62ldPDr1H 8ecQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=dR88xZKmkENuH6VkK1zNkHUK8aPsVDL94vF9o+eaqlo=; b=PqMm9rcuRWq4mG/uF2rOb3zBjicFkBNxVy2ZRVzUaEzip/Ofk4gTTa8UlUmmtHf6fn XZq+rUEWgzCavu7lDDh9XDaK21k0b37TF27BCFPbt06Go/Q9tZotvkrh97iwWxgV6Duf w47jZzFYd1Bi6TPnXUrv9yugTKT5C1EjpfGiFAQM28+lBezGTBSfgtFBqKj1oHbElCaa GUsqtvZV7bb053BpXBSlDS9tmG416JmI38dYeMYGr1xzl2y7CX1QUjnH0oD0ZgTWxxxJ 9+SFD7p9Rmj4wpSUv4QbBsil9Ba/KYb63eFhXBGdnnzoPcMJTVjIWh74q9I3FMcJbsUg q3mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ks85CwdM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y14-v6si1138138pgo.286.2018.05.15.19.21.27; Tue, 15 May 2018 19:21:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ks85CwdM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752234AbeEPCUV (ORCPT + 99 others); Tue, 15 May 2018 22:20:21 -0400 Received: from mail-ot0-f194.google.com ([74.125.82.194]:39222 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751309AbeEPCUT (ORCPT ); Tue, 15 May 2018 22:20:19 -0400 Received: by mail-ot0-f194.google.com with SMTP id l12-v6so2629357oth.6 for ; Tue, 15 May 2018 19:20:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dR88xZKmkENuH6VkK1zNkHUK8aPsVDL94vF9o+eaqlo=; b=Ks85CwdMg2FSrg25xbW+UwhVpRwDEpoF0SsIsO0d5pxDGlMUVQlPuZVDNGo+dOQ+iY 4mOevP/dy+BgfebP8FZmY5bS51oL444efWnrwxNcvlIqZv5/5RdD9Xrh1o6FeApFcxN/ SuPCz3/XileSizzn4aLVfp9DwstSo6CzLLKoU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dR88xZKmkENuH6VkK1zNkHUK8aPsVDL94vF9o+eaqlo=; b=LCujJDHz2eSpSALirmljPUzWZ1HVgt6odepCKeKemj2cax+ICG5dOTgyf/ZWvrd+7y 2eFnm7+gEAuYfW5xeISWpHvwYzTJQ9Z083fcrQnWk23hsz65gauHnJJ8XfP3jZw+p2lO NcYg9vJnHiFc25ADgvrB2nZy3tH0hRiqassvwDI8jXEGqKTVzIy+GL7y/VgItn1ASjaW NiYxf/8eHfBc0N0lPufSWSMWV6Fpz/MIF/bou73NRcbwCSvDzhF+DG7uWONsvaH0Q0bJ +XuboCqLARGuk+/OPUKRbl9NVq2MUsDxmVUmNJobO9V0U5vCxINHHV6Ge1f6VuWD1Ckm VUbw== X-Gm-Message-State: ALKqPwcyk4d5mZACRxfbyFKF0iWVAGRLUY06uJPmK8uIXFrnFi1jpUjB Axjmy5TihR9QC0I6E0W26OHu5uqRQGrcKlIlQ/jqcg== X-Received: by 2002:a9d:5508:: with SMTP id l8-v6mr11786545oth.159.1526437218565; Tue, 15 May 2018 19:20:18 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:2d77:0:0:0:0:0 with HTTP; Tue, 15 May 2018 19:20:17 -0700 (PDT) In-Reply-To: <20180515102715.GO29062@mai> References: <20180515102715.GO29062@mai> From: Baolin Wang Date: Wed, 16 May 2018 10:20:17 +0800 Message-ID: Subject: Re: [RFC PATCH 00/10] Add persistent clock support To: Daniel Lezcano Cc: Thomas Gleixner , John Stultz , Arnd Bergmann , Tony Lindgren , aaro.koskinen@iki.fi, linux@armlinux.org.uk, Mark Rutland , Marc Zyngier , Mark Brown , Paul McKenney , mlichvar@redhat.com, rdunlap@infradead.org, Kate Stewart , Greg KH , Philippe Ombredanne , Thierry Reding , Jon Hunter , =?UTF-8?Q?Heiko_St=C3=BCbner?= , Linus Walleij , Viresh Kumar , Ingo Molnar , "H. Peter Anvin" , peterz@infradead.org, douly.fnst@cn.fujitsu.com, len.brown@intel.com, rajvi.jingar@intel.com, Alexandre Belloni , x86@kernel.org, Linux ARM , linux-tegra@vger.kernel.org, LKML , linux-omap@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, On 15 May 2018 at 18:27, Daniel Lezcano wrote: > On Mon, May 14, 2018 at 04:55:26PM +0800, Baolin Wang wrote: >> Hi, >> >> We will meet below issues when compensating the suspend time for the timekeeping. >> >> 1. We have too many different ways of dealing with persistent timekeeping >> across architectures, so it is hard for one driver to compatable with different >> architectures. >> >> 2. On some platforms (such as Spreadtrum platform), we registered the high >> resolution timer as one clocksource to update the OS time, but the high >> resolution timer will be stopped in suspend state. So we use another one >> always-on timer (but low resolution) to calculate the suspend time to >> compensate the OS time. Though we can register the always-on timer as one >> clocksource, we need re-calculate the mult/shift with one larger conversion >> range to calculate the suspend time and need update the clock in case of >> running over the always-on timer. > > First, can you elaborate what you mean by 'suspend state' ? On which power What I mean is the high resolution timer will be stopped when the system goes into suspend state. > domain the clocksource belongs to? On Spreadtrum platform, It belongs to one power domain named "APCPU_TOP", that will be power down when the system goes into suspend state. -- Baolin.wang Best Regards