From: Peter Zijlstra on
On Tue, 2010-06-22 at 18:21 +0200, Frederic Weisbecker wrote:
> On Fri, Jun 18, 2010 at 09:11:58AM +0200, Peter Zijlstra wrote:
> > On Fri, 2010-06-18 at 04:14 +0200, Frederic Weisbecker wrote:
> > > On Wed, Jun 16, 2010 at 06:00:33PM +0200, Peter Zijlstra wrote:
> > > > +static void armpmu_pmu_enable(struct pmu *pmu)
> > > > {
> > > > +static void powerpc_pmu_pmu_disable(struct pmu *pmu)
> > > > {
> > > > +static void fsl_emb_pmu_pmu_disable(struct pmu *pmu)
> > > > {
> > > > +static void sh_pmu_pmu_enable(struct pmu *pmu)
> > > > +{
> > > > +static void sparc_pmu_pmu_enable(struct pmu *pmu)
> > > > {
> > > > +static void x86_pmu_pmu_disable(struct pmu *pmu)
> > > > {
> > >
> > >
> > > These namings are really bad. Why not just using pmu once
> > > in each names? x86_pmu_enable, etc...
> >
> > Because some of those were already taken:
> >
> > static const struct pmu pmu = {
> > .enable = x86_pmu_enable,
> > .disable = x86_pmu_disable,
>
>
> Then those should be renamed into x86_event_enable or so.
>
well, possibly, but the patches were large enough already.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Paul Mackerras on
On Thu, Jun 24, 2010 at 04:28:12PM +0200, Peter Zijlstra wrote:

> Changes perf_disable() into perf_pmu_disable().

Needs this rolled in to compile on powerpc.

Paul.

diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c
index 8890456..9046aea 100644
--- a/arch/powerpc/kernel/perf_event.c
+++ b/arch/powerpc/kernel/perf_event.c
@@ -517,7 +517,7 @@ static void write_mmcr0(struct cpu_hw_events *cpuhw, unsigned long mmcr0)
* Disable all events to prevent PMU interrupts and to allow
* events to be added or removed.
*/
-static void powerpc_pmu_pmu_disable(struct pmu *pmu)
+static void power_pmu_pmu_disable(struct pmu *pmu)
{
struct cpu_hw_events *cpuhw;
unsigned long flags;
@@ -565,7 +565,7 @@ static void powerpc_pmu_pmu_disable(struct pmu *pmu)
* If we were previously disabled and events were added, then
* put the new config on the PMU.
*/
-static void powerpc_pmu_pmu_enable(struct pmu *pmu)
+static void power_pmu_pmu_enable(struct pmu *pmu)
{
struct perf_event *event;
struct cpu_hw_events *cpuhw;
@@ -1130,7 +1130,7 @@ static int power_pmu_event_init(struct perf_event *event)
struct pmu power_pmu = {
.pmu_enable = power_pmu_pmu_enable,
.pmu_disable = power_pmu_pmu_disable,
- .event_init = pmwer_pmu_event_init,
+ .event_init = power_pmu_event_init,
.enable = power_pmu_enable,
.disable = power_pmu_disable,
.read = power_pmu_read,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Peter Zijlstra on
On Fri, 2010-07-09 at 17:31 +1000, Paul Mackerras wrote:
> On Thu, Jun 24, 2010 at 04:28:12PM +0200, Peter Zijlstra wrote:
>
> > Changes perf_disable() into perf_pmu_disable().
>
> Needs this rolled in to compile on powerpc.

Done (a week or so ago, should have reposted, will do in a moment).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Paul Mackerras on
On Fri, Jul 09, 2010 at 10:21:27AM +0200, Peter Zijlstra wrote:

> -void hw_perf_disable(void)
> +static void powerpc_pmu_pmu_disable(struct pmu *pmu)

> -void hw_perf_enable(void)
> +static void powerpc_pmu_pmu_enable(struct pmu *pmu)

> struct pmu power_pmu = {
> - .event_init = power_pmu_event_init,
> + .pmu_enable = power_pmu_pmu_enable,
> + .pmu_disable = power_pmu_pmu_disable,
> + .event_init = pmwer_pmu_event_init,

Doh! Think you posted the old version of the patch again...

:)

Paul.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Peter Zijlstra on
On Fri, 2010-07-09 at 20:17 +1000, Paul Mackerras wrote:
> On Fri, Jul 09, 2010 at 10:21:27AM +0200, Peter Zijlstra wrote:
>
> > -void hw_perf_disable(void)
> > +static void powerpc_pmu_pmu_disable(struct pmu *pmu)
>
> > -void hw_perf_enable(void)
> > +static void powerpc_pmu_pmu_enable(struct pmu *pmu)
>
> > struct pmu power_pmu = {
> > - .event_init = power_pmu_event_init,
> > + .pmu_enable = power_pmu_pmu_enable,
> > + .pmu_disable = power_pmu_pmu_disable,
> > + .event_init = pmwer_pmu_event_init,
>
> Doh! Think you posted the old version of the patch again...

*sigh*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/