Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp25210imm; Tue, 17 Jul 2018 13:13:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfF1z0mIiQ7qeFql/mIO67CNBMdXSPtFNJv62aRJYPKIZ+S0SLQmJqWRobRMzRVpxd9eLQJ X-Received: by 2002:aa7:850b:: with SMTP id v11-v6mr2077968pfn.165.1531858389442; Tue, 17 Jul 2018 13:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531858389; cv=none; d=google.com; s=arc-20160816; b=ftQ6Q2XVkR1yberI3Z0wSJ1jKgkesec70lQKMuLR3ocLnof3U6IUY2/c2Zt+BLRgS8 oCE4Trztb1Bcx3cLHKWorJ+IOYrsdcbuiYWgh/xd4ziOHD0oQvHF05I66cZQuHLr6gJy nIDYE2hbZc6SwRnru8Fg+nt9MSsP+UMJ9onWKkHvFst3Xbxt7kXBbayavGjvocgmW6JT Yt1JQh7few174kP9995qeR4d5MPigQtdNXt57n5k7BT659hQuN1iy9rueGk5Yay/HAM0 Fl/Dv3aypSxHtfxbxWtu5gT/Y0HnNq0GbfeQto3rEuqz0tEhFUSojeUevJqLRp5AASCO qEZA== 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=zJsq8G2P8bIdQvslkErgpO7Ux1/Wb7gZWH3pIsDvxec=; b=ncSMN5PMFoEeBcRPelDXD4lVzcL2Haa86zP5mgZ8+7UfXMGgDdrxS9N54w7Mr38cXf CMkmNicC8G90pO82EdgwU0RGwVvukn+vwdTk/wGjUSGX9Hj88slHMbHEnbWgyuLIkaF8 wizLJ6bV3qVk4RTObiq0keT6LVkUL9ARL4JDm12jL49lIT2CL7VmJIdKgQVF970mt/BS vqp5AbNYi54M6RyR7IDYHauHuXUFEmCec6SR+RBYVSInSZlhlevT5QpfDVNRFfpBuvVa oLh6Asy0GezRerENH1CA9cE3E2J4VBBwq0kq5DFAE9UvRQ2L5LNfKyMJjBF8E7dx+qFn uLPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cwFTbvTO; 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 g124-v6si1566444pfb.280.2018.07.17.13.12.52; Tue, 17 Jul 2018 13:13:09 -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=cwFTbvTO; 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 S1731103AbeGQUpu (ORCPT + 99 others); Tue, 17 Jul 2018 16:45:50 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:39022 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729719AbeGQUpu (ORCPT ); Tue, 17 Jul 2018 16:45:50 -0400 Received: by mail-wr1-f66.google.com with SMTP id h10-v6so2417440wre.6 for ; Tue, 17 Jul 2018 13:11:35 -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=zJsq8G2P8bIdQvslkErgpO7Ux1/Wb7gZWH3pIsDvxec=; b=cwFTbvTOUWFjiwxwXIJvrsjjoM+zNV/szK7vFxP6awhty/z3qKgvkWeZWljBno1w/1 vzAIix6voaxJsi3JmqaaGJSyGPCKa4YIpkPLb5yK4Mgo18VsVAil7oI1DfLQ9oIPf8OP GaSFmTB64hCVUVBHkEEIj9lMKkDZH9u78c2CY= 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=zJsq8G2P8bIdQvslkErgpO7Ux1/Wb7gZWH3pIsDvxec=; b=s7QiKDAu2UTBu8h7FTtM8Lv8k+cxFSblg1PxH7eYRTHk5tdYzDpRCzMA2AMeSDgB0s nDsYMl3u0GIvPFwy/dPY8pBYaYSDC/FmcPTzdw2Od1yEwgnSYfU6BS5c0Czw0sftRkdy mb/+PSO5/4gThyGCxRO98enUEwVd5KWNvEvWboZ3OtrjJPl0aYTXuOfM/gxeVrJ9TcH6 Pq1J+UzFbQWmWGkG5MLgwtJO3WgRG/KegjAGtL2q6BixvJt6uWINnT2TRYQMENeotWz6 mncD/nlxUjHCjaQJ1vr9g4EQi5Ah/yjumkD1j8+1Qe9R21g+jtxnF7sTUfLSlr/9n3X2 OBJA== X-Gm-Message-State: AOUpUlGxjF59wvJodHL0czznfdK0l4c5McIEh4xRSqHo5+4aROfqALIj TFoojBicD1AXLDCMctJacIL9k1CudrTlqVtLzCq0IQ== X-Received: by 2002:adf:f342:: with SMTP id e2-v6mr2331263wrp.161.1531858294351; Tue, 17 Jul 2018 13:11:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:c243:0:0:0:0:0 with HTTP; Tue, 17 Jul 2018 13:11:33 -0700 (PDT) In-Reply-To: References: From: John Stultz Date: Tue, 17 Jul 2018 13:11:33 -0700 Message-ID: Subject: Re: [PATCH 1/2] time: Introduce one suspend clocksource to compensate the suspend time To: Baolin Wang Cc: Thomas Gleixner , Stephen Boyd , Arnd Bergmann , Mark Brown , Daniel Lezcano , lkml 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 Tue, Jul 17, 2018 at 12:55 AM, Baolin Wang wrote: > On some hardware with multiple clocksources, we have coarse grained > clocksources that support the CLOCK_SOURCE_SUSPEND_NONSTOP flag, but > which are less than ideal for timekeeping whereas other clocksources > can be better candidates but halt on suspend. > > Currently, the timekeeping core only supports timing suspend using > CLOCK_SOURCE_SUSPEND_NONSTOP clocksources if that clocksource is the > current clocksource for timekeeping. > > As a result, some architectures try to implement read_persistent_clock64() > using those non-stop clocksources, but isn't really ideal, which will > introduce more duplicate code. To fix this, provide logic to allow a > registered SUSPEND_NONSTOP clocksource, which isn't the current > clocksource, to be used to calculate the suspend time. > > Suggested-by: Thomas Gleixner > Signed-off-by: Baolin Wang > --- > Changes from RFC v1: > - Improve commit message. > - Remove the WARN_ON_ONCE(). > - Fix some coding style issues. > - Do not force to select a replacement suspend clocksource. Thanks again, I'll get this queued up for testing. thanks -john