Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3265786imm; Tue, 17 Jul 2018 01:41:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfcsT1iJlHukfQW7FTCUI4mlwDCw2Uh+nk9mnIo77ONsTPIRIVNexdtV8EL3LoZamVAuhY8 X-Received: by 2002:a17:902:d218:: with SMTP id t24-v6mr734021ply.63.1531816909390; Tue, 17 Jul 2018 01:41:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531816909; cv=none; d=google.com; s=arc-20160816; b=dyazUm5EbKSN9KELVTHMN86eVdu8HyfbtrUP+vw4BEkK9hPGXNzmj9xdfJFS2oEGny osFL2wG3AcIqw9e1H9hEgbOWQnRvD2mQQnL1753iKcCBy9IJhaFUbxtGNfTbeGgpv/a+ wbAso2+HljeUZCIDsiNIzH1nf5250DaXGoF6RjjFC8/u1CxIu8M4cKPZoNWCgsoKONzk siRxcHxUY8zX9PnXxlBVOBqoxi3EpeZP+kP2/rKpalf7D9eSF9E0R6TZDGwsDKXVDh5g QQwyZoILc3sl/VDUtkU4c5mqOc80MhfIHk+nvg1ca4c8R30BT83ceDDJPzkHsUB17xz7 PkdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=IrbukE7PiVLFOLAQYC4xLgCKoyRLwX2NF0Ymdc2p6YM=; b=r339bqvYBBMvuiOA9wbJe36oFiL6g7IOaGnpwKkxA7MSvd73PBdj55yOBT7cIGE7l7 JhmlcF4r7Z4o57PV70fFGPabWSprbBg3hBTk/thYCPw89F4OAVpyVmz6V8X5SexwqNud GXPfd03sD4h3ZnBeYMQVIyQhxBNCYIbveKz+bycYWVYCpUxEt55FqY24yynca+ZcivmQ O2sn77iPm8sxz/xWzKxKUcajCU7xOFmW0XOZxOWWh6ijeBYfuxv3SHzxhtHicffGbuai U301vxktRhYWizQLfERaWJGcdhSBvKrMWK8sNX+REOeYU9e7m7D5XhoMmQVAfVvGSyzt 0STg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si441130plf.84.2018.07.17.01.41.34; Tue, 17 Jul 2018 01:41:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729583AbeGQJLo (ORCPT + 99 others); Tue, 17 Jul 2018 05:11:44 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:54206 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728349AbeGQJLo (ORCPT ); Tue, 17 Jul 2018 05:11:44 -0400 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ffLWm-0002rj-J9; Tue, 17 Jul 2018 10:40:12 +0200 Date: Tue, 17 Jul 2018 10:40:12 +0200 (CEST) From: Thomas Gleixner To: Baolin Wang cc: john.stultz@linaro.org, sboyd@kernel.org, arnd@arndb.de, broonie@kernel.org, daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] time: Introduce one suspend clocksource to compensate the suspend time In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Jul 2018, 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 Well done! Reviewed-by: Thomas Gleixner