[PATCH 5/5] arm/perfevents: implement perf event support for ARMv6

Will Deacon will.deacon at arm.com
Wed Jan 27 12:57:32 EST 2010


Hi Jean,

Jean Pihet wrote:

> > However, if the IRQs are
> > defined, but for some reason we fail to request them, then the
> > armpmu_reserve_hardware function will fail.
> That is the expected behaviour, isn't it?
> Why is the PMU request failing? That is worth investigating. I never had that
> problem on the Cortex-A8. Is it caused because of the multicore?

Don't worry, requesting the IRQs did not fail. I was simply speculating about
the behaviour if it *does* fail. Then armpmu_reserve_hardware will return an
error, which will prevent the event being added. Instead, we could print a
warning, but continue without IRQs in the same manner as though they had not
been defined in pmu.c.
 
> > Actually, the return
> > value appears to be uninitialised if you don't have any IRQs defined.
> If the PMU request fails the IRQ should not be requested, so I think it is ok.
> Is that correct?

What I mean is, if pmu_irqs->num_irqs < 1, then we return err without ever
setting it. In fact, we might even end up freeing IRQs which we haven't
requested which could cause all sorts of problems.

> >
> > Anyway, apart from that, it appeared to work fine.
> Good!
> 
> Thanks for testing!
> Jean
> 
> > Tested-by: Will Deacon <will.deacon at arm.com>

That's alright, but it's conditional on sorting out the above! :)

Cheers,

Will





More information about the linux-arm-kernel mailing list