From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A2B4C4361A for ; Thu, 3 Dec 2020 14:59:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFA4F206D6 for ; Thu, 3 Dec 2020 14:59:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFA4F206D6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=foOSXnyGSyW901WCGMNyoBVqZ0Mu+VP0Tz52q0eHE/M=; b=26iaMiPs6KDVcWcpp7fOe8twi 8CHenoDTRo5p7/UMipr1mbKKNOddI16wYY6LrJmD5ouy19lOMaEOB0lTof1tphvc2AYZZ2UtggpPH stKuOvd2tRFM9UQs9tXaqc+GFDLDzStOUu+mVcq9LmKpsUkGKu3CCahg4AGDBldqMqCfsBPnvei6c urp8erVKeuKlGd8p9ld28L9oWBnC5hF4XvcTU0jGZY78yFxlDi6Mhx6BvuK49ZEsqVATR1lYOT3GF TxkAnhpa1dvKI7cwpfZh9hkn2MByZKOFvL7i/Jq/lDoLGSNEwLJsz20cOJJAOzUiGCe4ZT9+/7lNs mLM0GR3pA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkq43-0005xC-Si; Thu, 03 Dec 2020 14:58:35 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkq40-0005wC-Jj for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2020 14:58:33 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9AEF2206D6; Thu, 3 Dec 2020 14:58:31 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1kkq3v-00FhMk-F6; Thu, 03 Dec 2020 14:58:27 +0000 MIME-Version: 1.0 Date: Thu, 03 Dec 2020 14:58:27 +0000 From: Marc Zyngier To: Keqian Zhu Subject: Re: [PATCH v2 1/2] clocksource: arm_arch_timer: Use stable count reader in erratum sne In-Reply-To: <20200818032814.15968-2-zhukeqian1@huawei.com> References: <20200818032814.15968-1-zhukeqian1@huawei.com> <20200818032814.15968-2-zhukeqian1@huawei.com> User-Agent: Roundcube Webmail/1.4.9 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: zhukeqian1@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, steven.price@arm.com, drjones@redhat.com, catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, wanghaibin.wang@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201203_095832_748925_FBEA0EBD X-CRM114-Status: GOOD ( 19.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , kvm@vger.kernel.org, Suzuki K Poulose , Catalin Marinas , linux-kernel@vger.kernel.org, Steven Price , James Morse , wanghaibin.wang@huawei.com, Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-08-18 04:28, Keqian Zhu wrote: > In commit 0ea415390cd3 ("clocksource/arm_arch_timer: Use > arch_timer_read_counter > to access stable counters"), we separate stable and normal count reader > to omit > unnecessary overhead on systems that have no timer erratum. > > However, in erratum_set_next_event_tval_generic(), count reader becomes > normal > reader. This converts it to stable reader. > > Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use > arch_timer_read_counter to access stable counters") On a single line. > Signed-off-by: Keqian Zhu > --- > drivers/clocksource/arm_arch_timer.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/clocksource/arm_arch_timer.c > b/drivers/clocksource/arm_arch_timer.c > index 6c3e841..777d38c 100644 > --- a/drivers/clocksource/arm_arch_timer.c > +++ b/drivers/clocksource/arm_arch_timer.c > @@ -396,10 +396,10 @@ static void > erratum_set_next_event_tval_generic(const int access, unsigned long > ctrl &= ~ARCH_TIMER_CTRL_IT_MASK; > > if (access == ARCH_TIMER_PHYS_ACCESS) { > - cval = evt + arch_counter_get_cntpct(); > + cval = evt + arch_counter_get_cntpct_stable(); > write_sysreg(cval, cntp_cval_el0); > } else { > - cval = evt + arch_counter_get_cntvct(); > + cval = evt + arch_counter_get_cntvct_stable(); > write_sysreg(cval, cntv_cval_el0); > } With that fixed: Acked-by: Marc Zyngier This should go via the clocksource tree. Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel