From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 2/3] introduce intel_rapl driver Date: Thu, 26 May 2011 12:21:39 +0200 Message-ID: <1306405299.1200.51.camel__39540.7620272183$1306405398$gmane$org@twins> References: <1306398857.2207.157.camel@rui> <1306403003.1200.41.camel@twins> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1306403003.1200.41.camel@twins> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Zhang Rui Cc: Matt Fleming , ming.m.lin@intel.com, LKML , acme@redhat.com, linux-pm , mingo@elte.hu List-Id: linux-pm@vger.kernel.org On Thu, 2011-05-26 at 11:43 +0200, Peter Zijlstra wrote: > > + for(id = 0; id < RAPL_DOMAIN_MAX; id++) > > + if (rapl_domains[id].valid) > > + perf_pmu_register(&(rapl_domains[id].pmu), rapl_domains[id].pmu.name, PERF_TYPE_SOFTWARE); > > Uhm, hell no!, you get to use type = -1. Also, you don't need a struct pmu per domain.