Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755048Ab0DUOWl (ORCPT ); Wed, 21 Apr 2010 10:22:41 -0400 Received: from casper.infradead.org ([85.118.1.10]:53137 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754959Ab0DUOWk (ORCPT ); Wed, 21 Apr 2010 10:22:40 -0400 Subject: Re: [RFC] perf_events: support for uncore a.k.a. nest units From: Peter Zijlstra To: Lin Ming Cc: "eranian@gmail.com" , "Gary.Mohr@Bull.com" , Corey Ashford , LKML In-Reply-To: <1271887942.3054.33.camel@localhost> References: <1271424250.4807.2277.camel@twins> <1271764547.13968.69.camel@minggr.sh.intel.com> <1271764993.1676.431.camel@laptop> <1271837295.3794.3.camel@minggr.sh.intel.com> <1271839190.3794.5.camel@minggr.sh.intel.com> <1271842974.3794.16.camel@minggr.sh.intel.com> <1271843869.1776.65.camel@laptop> <1271887942.3054.33.camel@localhost> Content-Type: text/plain; charset="UTF-8" Date: Wed, 21 Apr 2010 16:22:35 +0200 Message-ID: <1271859755.1776.108.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 794 Lines: 25 On Wed, 2010-04-21 at 22:12 +0000, Lin Ming wrote: > + ret = pmu->commit_txn(pmu); > + if (!ret) { > + pmu->stop_txn(pmu); > + return 0; > + } > > group_error: > + pmu->stop_txn(pmu); If you let commit_txn() also clear the state you can save some logic and a method. But yes, this looks good. If you don't remove the weak interface just yet, you can do a patch per architecture that uses this (at least powerpc and sparc do), and remove the weak thing at the end once all users are gone. -- 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/