From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932129Ab0F2Qe1 (ORCPT ); Tue, 29 Jun 2010 12:34:27 -0400 Received: from casper.infradead.org ([85.118.1.10]:56806 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756581Ab0F2QeZ convert rfc822-to-8bit (ORCPT ); Tue, 29 Jun 2010 12:34:25 -0400 Subject: Re: [RFC][PATCH 09/11] perf: Default PMU ops From: Peter Zijlstra To: Frederic Weisbecker Cc: paulus , stephane eranian , Robert Richter , Will Deacon , Paul Mundt , Cyrill Gorcunov , Lin Ming , Yanmin , Deng-Cheng Zhu , David Miller , linux-kernel@vger.kernel.org In-Reply-To: <20100629150305.GG5318@nowhere> References: <20100624142804.431553874@chello.nl> <20100624143406.993794468@chello.nl> <20100629145806.GE5318@nowhere> <1277823591.1868.43.camel@laptop> <20100629150305.GG5318@nowhere> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Tue, 29 Jun 2010 18:34:10 +0200 Message-ID: <1277829250.1868.46.camel@laptop> 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 Tue, 2010-06-29 at 17:03 +0200, Frederic Weisbecker wrote: > > You mean, if (!pmu->start_txn && pmu->pmu_enable) { /* install defaults > > */ } ? > > > Not really. pmu_*able and txn are there for different purposes. > A pmu implementation may want to provide enable/disable things > but not require any txn. Or one may just not need any of those, > like software events. > > It should simply map to a nop if nothing is provided. Thing is, using at least the pmu_enable/disable fallback when no txn methods are provided can save bunch of hardware writes. So this trivial fallback makes sense.