From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756147Ab0EJJmm (ORCPT ); Mon, 10 May 2010 05:42:42 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:37640 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755921Ab0EJJmh convert rfc822-to-8bit (ORCPT ); Mon, 10 May 2010 05:42:37 -0400 Subject: Re: [RFC][PATCH 2/9] perf: core, remove hw_perf_event_init From: Peter Zijlstra To: Lin Ming Cc: Ingo Molnar , Frederic Weisbecker , "eranian@gmail.com" , "Gary.Mohr@Bull.com" , Corey Ashford , "arjan@linux.intel.com" , "Zhang, Yanmin" , Paul Mackerras , "David S. Miller" , Russell King , Paul Mundt , lkml In-Reply-To: <1273483595.15998.56.camel@minggr.sh.intel.com> References: <1273483595.15998.56.camel@minggr.sh.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Mon, 10 May 2010 11:42:21 +0200 Message-ID: <1273484541.5605.3336.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2010-05-10 at 17:26 +0800, Lin Ming wrote: > A new field "pmu_id" is added to struct perf_event_attr. > > 2 new functions: perf_event_register_pmu, perf_event_lookup_pmu > perf_event_register_pmu: the pmu registration facility > perf_event_lookup_pmu: lookup the pmu via the passed in event->attr.pmu_id. > > A new api pmu->init_event to replace hw_perf_event_init Another problem, this patch breaks all of perf by removing the weak call before there is a replacement. Please rework such that there is a smooth transition. Also, for compatibilities sake, the cpu pmu will be required to get pmu_id==0, this doesn't provide that.