Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1624644imm; Wed, 16 May 2018 00:12:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqGWxil4xflMP24PjnQJPAfpVj+UOH62DEaUzkQ/UXDNisChsHcWA1D5tufdHgU5UNTronr X-Received: by 2002:a62:e801:: with SMTP id c1-v6mr18709517pfi.184.1526454738257; Wed, 16 May 2018 00:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526454738; cv=none; d=google.com; s=arc-20160816; b=hJwq184GDdeRIcAgg3zBa/l0Z06jH9eSZKLQFL6OxYT4WnxCD5QV3ThFR7DfcVpKgR GT9ikfc1JyfaSusRnzeirTER9Q/RPmRgp7UAv78eGvNj/ebvmTyIj/346K54NQrns9Rb 2Gqrod3DX6QCgp1oA2qulStOq7gyW09X5MbD/QBwB9ZbxmtGrq1L3jlTHJlmQzzs9TMA Njg8KDvZJCcAChg5+ZbDf1CHzKJnbVXtExUP28GastYfLLJCtXSb2HuqdgBKeQR+b+Ii r/QbFq1KZPBJCVH87gYCEAVJ4G4LmORK9Qd9l1k2mHQOErQtdk3fZ2+sNxXSyqHlPMg+ cBNw== 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=9rKm/LcBBOKAHUDVd/bdojTdxyo14XspTYe9uQdbA4k=; b=tFnaDh/RFsrOA0/IWCTJNh3gn2ijjRVq2NdFN7f03MJBlkjAAug8r3jltebo05Z8x+ l2mTAbNZyhyZFzdYMjF8vD8tmfsZ/WHwU4XQej3D+IsD1cB98qy7QjF2E8lt82kBx5Hf +ThH3E3p6P836UP+n2i1KobdPV61xPeLWNnoLoAZBWR5GJASHNCEu6H4mocOoaxcMFBQ Na6RV6t9IjWYg++qz89V51pLiC95QJUihDklAiYiackcguTBDedJ35VnzGGfxJdwit06 AMwh9QYs9riAsGMulTo7FDbaZEXUX9eB8g0a9NFcxZF8T6i7idNk+6RcYrqiE2FbI6Ty L/TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H3QV3zGg; 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 b63-v6si1905673plb.566.2018.05.16.00.12.04; Wed, 16 May 2018 00:12:18 -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=H3QV3zGg; 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 S1751859AbeEPHLw (ORCPT + 99 others); Wed, 16 May 2018 03:11:52 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:36380 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751319AbeEPHLu (ORCPT ); Wed, 16 May 2018 03:11:50 -0400 Received: by mail-oi0-f65.google.com with SMTP id v2-v6so2540228oif.3 for ; Wed, 16 May 2018 00:11:49 -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=9rKm/LcBBOKAHUDVd/bdojTdxyo14XspTYe9uQdbA4k=; b=H3QV3zGg1u1CmJ8hVD9NSuuA7Si5SHYfDFhWA1i8ZoUKmT8m3XAhgOMmrY9HE1HbWQ DIvmFrW0DNapz5Y/j3JqVv3q/BYeLl1+WNWfxhRxIb30ECcR+GJdScwoleZE/GaQqD/t WsP9NA8jG3SCwlOU6i1NtopHyit4nhanb63ns= 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=9rKm/LcBBOKAHUDVd/bdojTdxyo14XspTYe9uQdbA4k=; b=EyJQFDYEqZ0s7uJBIdH+yCFeU/M0mpk3YhsNdBpo4tw2sgB1hUzCJoOhGVl0tF429U KsClq5Ns5gZ1bRIO5v/uX19KChD1ODhVkO1CHANzimrbSNUj2R6Ws3nT3sY0oLPfg4SA 1oDgNpeERiHBdP2ffuK35Xi+A+9X4I5TkQOxlammMf2Or3SY/1geucbSK8TBrtdettBw 2ahElmEGu8HITtUhW8HAHztO/LA6fWxEVIeQ/EDtYbu9vUpA0U5axK/grLWEmeNyZGJc K/KjuawzYyX4irtAxtlCVisKRzfdO6NkP6vl7eIIGlwKZqF/e8BT8rIaRzfkk6XwEMlY QlaQ== X-Gm-Message-State: ALKqPwfUbAwG2pwCRNN6lXKB+dTgo0vUdmcLSBESO0oKKglILClzfGsd K45j8CUpHcTYhyJWjYb4DbhNz8UvnCWW51cXXpxJCA== X-Received: by 2002:aca:3c07:: with SMTP id j7-v6mr12423728oia.128.1526454709314; Wed, 16 May 2018 00:11:49 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:2d77:0:0:0:0:0 with HTTP; Wed, 16 May 2018 00:11:48 -0700 (PDT) In-Reply-To: References: <20180515102715.GO29062@mai> From: Baolin Wang Date: Wed, 16 May 2018 15:11:48 +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 On 16 May 2018 at 10:20, Baolin Wang wrote: > 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. Sorry, I made a mistake here. Our high resolution timer is on one always-on power domain, but it's clock will be shut down when the system goes into suspend. -- Baolin.wang Best Regards