From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752574AbcBVPQ3 (ORCPT ); Mon, 22 Feb 2016 10:16:29 -0500 Received: from foss.arm.com ([217.140.101.70]:58072 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751789AbcBVPQ2 (ORCPT ); Mon, 22 Feb 2016 10:16:28 -0500 Date: Mon, 22 Feb 2016 15:16:24 +0000 From: Mark Rutland To: "Suzuki K. Poulose" Cc: linux-arm-kernel@lists.infradead.org, punit.agrawal@arm.com, arm@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 10/12] arm-cci: CCI-500: Work around PMU counter writes Message-ID: <20160222151623.GH3435@leverpostej> References: <1453720877-24962-1-git-send-email-suzuki.poulose@arm.com> <1453720877-24962-11-git-send-email-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1453720877-24962-11-git-send-email-suzuki.poulose@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A couple more comments for things i just realised: > + /* > + * Now that all the counters are disabled, we can safely turn the PMU on, > + * without syncing the status of the counters > + */ > + __cci_pmu_enable(cci_pmu, CCI_CNTRS_NOSYNC); As per my other comment, __cci_pmu_enable_nosync(cci_pmu) would be preferable. [...] > + pmu_write_counter(cci_pmu, > + (u32)local64_read(&event->hw.prev_count), i); That cast can go. Mark.