Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1298387pxu; Sat, 5 Dec 2020 10:36:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJhMuILKkHaZcI/7DRGdlQ38zl5Csf9IcgswmAuwVceIcenztxH/v+CIyfjuzokOwgwlBj X-Received: by 2002:a50:d6dc:: with SMTP id l28mr12847337edj.286.1607193370616; Sat, 05 Dec 2020 10:36:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607193370; cv=none; d=google.com; s=arc-20160816; b=rcyfwsKo163eMtQz3Ae4RGQISbBwkSYg9vsLql8UT8/hiBaz77yNHAlGvIYkrBrAjV RwLZBJHnpzBkYpD5YZ73sykj5z4jWjR6ayV3lrr8Qb9Di2S16oH5MJy5v1tDcJD6tg0k ek9RUbcKFMdlnd7HwuomAuyh+H0s/unOXTyPzgTale9zE2PHc8DH12LVxDyx6cbncMYn OXa+qAA+Nja/C2gm3dI/7ajvAxOmr0i5H91UUjOPTTukuHW4jeRchVz7Jrp5wQU7Pgbg 2VXXHjqqmluf7pJPt5/QAVm3Un7c5Z2IB0LcJ6YFp3zsbO9d5Y/DJjn18mTN83A6Nv7h 4GCA== 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=vrS4NyPK+3rSCDhsIlf2Rw+6R4+Lv/sOv9p9f/U0ra8=; b=jpxSUfC+UIB0fpi+u1oNKH0x/q1zlpB9teKeZkE6INPq2NsM+t9j/de0meDMVgHMFh KwjOqBQoFYXW0kdcZ/UKmxwsSh5udgE4l4M6DBik0uA4B/tKfEdYF0DqV/6yWEGoW98J 4IwfhOsDDana38meNsQSRqrR/y9DBC/uVcSpWpAn2QR5VSydQ9KVi11IXnXlG5E6ep+b m6MI9qvQhe8wtLWtsprR1k1w4w1ddkPO1589RcYzu0p0O6sClUO2GOG+prqJw6Dwugaz dkoo6ezy3ritiGCW6/9tpOSVDuhCCzcyi0UAmS8bO7FwvTTX0AWL/OVXW+AwNv8m2/Mj 9Y5Q== 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 zn8si3447202ejb.299.2020.12.05.10.35.47; Sat, 05 Dec 2020 10:36:10 -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 S1727863AbgLESWw (ORCPT + 99 others); Sat, 5 Dec 2020 13:22:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:52874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726186AbgLESWr (ORCPT ); Sat, 5 Dec 2020 13:22:47 -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 052B323138; Sat, 5 Dec 2020 18:22:07 +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 1klcC4-00GNe7-SK; Sat, 05 Dec 2020 18:22:05 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 05 Dec 2020 18:22:04 +0000 From: Marc Zyngier To: Daniel Lezcano Cc: Keqian Zhu , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Thomas Gleixner , Catalin Marinas , Will Deacon , James Morse , Suzuki K Poulose , Sean Christopherson , Julien Thierry , Mark Brown , Andrew Morton , Alexios Zavras , wanghaibin.wang@huawei.com Subject: Re: [PATCH v3 2/2] clocksource: arm_arch_timer: Correct fault programming of CNTKCTL_EL1.EVNTI In-Reply-To: References: <20201204073126.6920-1-zhukeqian1@huawei.com> <20201204073126.6920-3-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: daniel.lezcano@linaro.org, zhukeqian1@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, tglx@linutronix.de, catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, sean.j.christopherson@intel.com, julien.thierry.kdev@gmail.com, broonie@kernel.org, akpm@linux-foundation.org, alexios.zavras@intel.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 Hi Daniel, On 2020-12-05 11:15, Daniel Lezcano wrote: > Hi Marc, > > are you fine with this patch ? I am, although there still isn't any justification for the pos/lsb rework in the commit message (and calling that variable lsb is somewhat confusing). If you are going to apply it, please consider adding the additional comment below. > > > On 04/12/2020 08:31, Keqian Zhu wrote: >> ARM virtual counter supports event stream, it can only trigger an >> event >> when the trigger bit (the value of CNTKCTL_EL1.EVNTI) of CNTVCT_EL0 >> changes, >> so the actual period of event stream is 2^(cntkctl_evnti + 1). For >> example, >> when the trigger bit is 0, then virtual counter trigger an event for >> every >> two cycles. "While we're at it, rework the way we compute the trigger bit position by making it more obvious that when bits [n:n-1] are both set (with n being the most significant bit), we pick bit (n + 1)." With that: Acked-by: Marc Zyngier Thanks, M. -- Jazz is not dead. It just smells funny...