From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755313AbeARJg4 (ORCPT ); Thu, 18 Jan 2018 04:36:56 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:48301 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754860AbeARJgy (ORCPT ); Thu, 18 Jan 2018 04:36:54 -0500 Date: Thu, 18 Jan 2018 10:36:42 +0100 (CET) From: Thomas Gleixner To: Kan Liang cc: mingo@redhat.com, peterz@infradead.org, linux-kernel@vger.kernel.org, acme@kernel.org, eranian@google.com, ak@linux.intel.com Subject: Re: [PATCH V5 1/8] perf/x86/intel/uncore: customized event_read for client IMC uncore In-Reply-To: <1516042629-387021-1-git-send-email-kan.liang@intel.com> Message-ID: References: <1516042629-387021-1-git-send-email-kan.liang@intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 15 Jan 2018, kan.liang@intel.com wrote: > From: Kan Liang > > There are two free running counters for client IMC uncore. The custom > event_init() function hardcode their index to 'UNCORE_PMC_IDX_FIXED' and > 'UNCORE_PMC_IDX_FIXED + 1'. To support the 'UNCORE_PMC_IDX_FIXED + 1' > case, the generic uncore_perf_event_update is obscurely hacked. > The code quality issue will bring problem when new counter index is > introduced into generic code. For example, free running counter index. > > Introduce customized event_read function for client IMC uncore. > The customized function is exactly copied from previous generic > uncore_pmu_event_read. > The 'UNCORE_PMC_IDX_FIXED + 1' case will be isolated for client IMC > uncore only. > > Signed-off-by: Kan Liang Reviewed-by: Thomas Gleixner