From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751864AbcAEJuy (ORCPT ); Tue, 5 Jan 2016 04:50:54 -0500 Received: from foss.arm.com ([217.140.101.70]:57141 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751415AbcAEJuw (ORCPT ); Tue, 5 Jan 2016 04:50:52 -0500 Subject: Re: [PATCH v5 01/11] arm-cci: Define CCI counter period To: Mark Rutland References: <1451908490-2615-1-git-send-email-suzuki.poulose@arm.com> <1451908490-2615-2-git-send-email-suzuki.poulose@arm.com> <20160104181940.GA17127@leverpostej> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, arm@kernel.org, punit.agrawal@arm.com, peterz@infradead.org From: "Suzuki K. Poulose" Message-ID: <568B91F9.6010307@arm.com> Date: Tue, 5 Jan 2016 09:50:49 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20160104181940.GA17127@leverpostej> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/01/16 18:27, Mark Rutland wrote: > On Mon, Jan 04, 2016 at 11:54:40AM +0000, Suzuki K. Poulose wrote: >> Instead of hard coding the period we program on the PMU >> counters, define a symbol. >> >> - u64 val = 1ULL << 31; >> - local64_set(&hwc->prev_count, val); >> - pmu_write_counter(event, val); >> + local64_set(&hwc->prev_count, CCI_CNTR_PERIOD); >> + pmu_write_counter(event, CCI_CNTR_PERIOD); > > I think this is a little misleading (and confusing), as we're conflating > the period with its inverse. This wouldn't work for any other value of > CCI_CNTR_PERIOD. > > Perhaps s/PERIOD/START_VAL/, leaving everything else as-is? You are right, will change it. Cheers Suzuki