Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751932AbaBQHLw (ORCPT ); Mon, 17 Feb 2014 02:11:52 -0500 Received: from ozlabs.org ([203.10.76.45]:59383 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750896AbaBQHLv (ORCPT ); Mon, 17 Feb 2014 02:11:51 -0500 Message-ID: <1392621108.8740.5.camel@concordia> Subject: Re: [PATCH v2 10/11] powerpc/perf: add kconfig option for hypervisor provided counters From: Michael Ellerman To: Cody P Schafer Cc: Scott Wood , Paul Bolle , Peter Zijlstra , LKML , Tang Yuantian , Ingo Molnar , Paul Mackerras , "Aneesh Kumar K.V" , Arnaldo Carvalho de Melo , Priyanka Jain , Lijun Pan , Anshuman Khandual , Linux PPC , Anton Blanchard Date: Mon, 17 Feb 2014 18:11:48 +1100 In-Reply-To: <20140215002505.GA2991@negative> References: <1392415338-16288-1-git-send-email-cody@linux.vnet.ibm.com> <1392415338-16288-11-git-send-email-cody@linux.vnet.ibm.com> <1392417133.6733.624.camel@snotra.buserror.net> <20140215002505.GA2991@negative> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2014-02-14 at 16:25 -0800, Cody P Schafer wrote: > On Fri, Feb 14, 2014 at 04:32:13PM -0600, Scott Wood wrote: > > On Fri, 2014-02-14 at 14:02 -0800, Cody P Schafer wrote: > > > diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype > > > index 434fda3..dcc67cd 100644 > > > --- a/arch/powerpc/platforms/Kconfig.cputype > > > +++ b/arch/powerpc/platforms/Kconfig.cputype > > > @@ -364,6 +364,12 @@ config PPC_PERF_CTRS > > > help > > > This enables the powerpc-specific perf_event back-end. > > > > > > +config HV_PERF_CTRS > > > + def_bool y > > > + depends on PERF_EVENTS && PPC_HAVE_PMU_SUPPORT > > > + help > > > + Enable access to perf counters provided by the hypervisor > > > > Please don't add default-y stuff that is platform-specific, and > > definitely point out that platform dependency in the config description > > -- I have to look elsewhere in the patchset to determine that this is > > for "Power Hypervisor". PPC_HAVE_PMU_SUPPORT is enabled by all 6xx > > builds, even for hardware like e300 that doesn't have PMU at all (it has > > the FSL embedded perfmon instead), much less this hv interface. > > > > And yes, PPC_PERF_CTRS has the same problem and should be fixed. :-) > > Yep, I just based this one on what PPC_PERF_CTRS was doing. > > How about the following: > > +config HV_PERF_CTRS > + bool "Perf Hypervisor supplied counters" "Support for Hypervisor supplied PMU events (24x7 & GPCI)" ? > + default y > + depends on PERF_EVENTS && PPC_HAVE_PMU_SUPPORT && PPC_PSERIES I think you just want: depends on PERF_EVENTS && PPC_PSERIES Because you're adding two completely new PMUs, they're not a "struct power_pmu" backend for the existing powerpc PMU implementation. cheers -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/