Received: by 2002:aa6:c429:0:b029:98:93ff:f56f with SMTP id g9csp404229lkq; Thu, 3 Dec 2020 07:03:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAxgKQFbuigJHTDrXbr2SZBK612YlrYzLcRstSvvRfzwPF+bLifsaWSePypt4p+xtytvh8 X-Received: by 2002:adf:bb05:: with SMTP id r5mr4252589wrg.295.1607007784926; Thu, 03 Dec 2020 07:03:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607007784; cv=none; d=google.com; s=arc-20160816; b=TbeovcrH/bPuPKVRwBEouuJoda+61PbJMFaiUit84se/yVBWlHx9h57Cj1sC6v73bl BMPi9hDpDRdIrb10+eGm/ARqKccpG+GoyJ4RQ6Y5sUaeItmy20Bd8bjKg5CZJOPhjgWw QQ3A4lYZNOrQoqLwNw++X6+S2CRe+ovGQgdW/I8KwyJi2skLMtXpitoEXHz/BdTwk0DH dAuI1XZgTXCoIuzRW+sYKXgounL6fnlTNOs2hU3izcctpmTmdIVrFM5/lOaFK+hOwT5g 5jjy4oJZ0jkcE7BPfA6fysxLKcp9m67U0lSSyPAuEo/ivOzTDoIaQErmf56RQq5neml6 TEfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version; bh=NJLfWK9AXRge+FA7A8ZK4kcqfdqRZs+BbGMAP8Jtj18=; b=m9X3j0jmuVwi+brlSAgPsqBreME2MAY8S3B1U53J1XjbWxxlea15Rwg/WxsuqTWyiA eMQl7/4d6R5MoyLoiirjt0qkGTeRTkJ4o6nHHJNa08Vqp2a/P/GdkVwIiafX1PksNv/O 5iUmOSpbgxKGwxOpWnoGbUdkSOopR4uOjqbPn54VX7KuKE320KGuN7wIpVifUgc0iElo Q70fyE1jmNJrNwYXN0HYUL/xPGxlgpaO+xWo7AWO1Q85O4TxOfyGFzfaCASrQCdp0qsT 5QA9NJUYWzlS+PFH0vN7YXT/A2ep5DyKYFQ9pgrwbVBgMCeHEGyfqGvcszm9264kTi4R 5RHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u11si1102198edr.4.2020.12.03.07.02.36; Thu, 03 Dec 2020 07:03:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730929AbgLCO7N (ORCPT + 99 others); Thu, 3 Dec 2020 09:59:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:52432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727452AbgLCO7M (ORCPT ); Thu, 3 Dec 2020 09:59:12 -0500 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 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 03 Dec 2020 14:58:27 +0000 From: Marc Zyngier To: Keqian Zhu Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Steven Price , Andrew Jones , Catalin Marinas , Will Deacon , James Morse , Suzuki K Poulose , wanghaibin.wang@huawei.com 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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...