From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Fleming Date: Tue, 28 Sep 2010 08:33:56 +0000 Subject: Re: [PATCH 6/6] sh: oprofile: Use perf-events oprofile backend Message-Id: <20100928083355.GA4037@console-pimps.org> List-Id: References: <20100916143254.GC13563@erda.amd.com> <20100927200138.GG28588@console-pimps.org> <20100927220703.GV13563@erda.amd.com> <20100927222627.GH28588@console-pimps.org> <20100927224551.GX13563@erda.amd.com> In-Reply-To: <20100927224551.GX13563@erda.amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Robert Richter Cc: Will Deacon , Paul Mundt , Russell King , "linux-arm-kernel@lists.infradead.org" , "linux-sh@vger.kernel.org" , Peter Zijlstra , Ingo Molnar , Frederic Weisbecker , Arnaldo Carvalho de Melo , "linux-arch@vger.kernel.org" On Tue, Sep 28, 2010 at 12:45:51AM +0200, Robert Richter wrote: > On 27.09.10 18:26:27, Matt Fleming wrote: > > > > I don't see why we should pollute the perf namespace with a function > > that is only being used inside the SH oprofile code? There would be > > exactly one use of this function and I doubt the perf guys will want > > this function exposed. In it's current state, it really is no use to any > > architecture other than SH. > > > > We can always add a generic perf_pmu_name() function later if needed, > > but it's definitely not needed at the moment. > > Ok, so then let's implement sh_pmu_name() in > arch/sh/oprofile/common.c, we import asm/perf_event.h to get access to > struct sh_pmu. This could be implemented as a static function then and > we also get rid of this interface thing. That seems OK to me s'long as Paul (the author of the perf events code for SH) doesn't have a problem with us exposing the struct sh_pmu * outside of arch/sh/kernel/perf_event.c