Hi Vince, On Thu, Jan 09, 2014 at 03:47:19AM +0000, Vince Weaver wrote: > On Wed, 8 Jan 2014, Peter Zijlstra wrote: > > > On Wed, Jan 08, 2014 at 04:28:20PM -0500, Vince Weaver wrote: > > > Should the perf_event interface handle setups like this better and work > > > fine in aggregate mode but return ENOTSUP if a sampled or overflow event > > > is attempted? > > > > Yeah that would be better, we do something similar for P6 class machines > > without lapic IIRC. > > You're right. Something like the following works for me on the rasp-pi, > although maybe if x86 is doing it too things should be moved up into > generic code?
I'd rather see it in the generic code if at all possible. Maybe we could add a flags field to perf_pmu_register? > Return EOPNOTSUPP if we have no PMU overflow interrupt but a > sampled event is requested. > > Signed-off-by: Vince Weaver <vincent.wea...@maine.edu> > > diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h > index f24edad..f1f27a3 100644 > --- a/arch/arm/include/asm/pmu.h > +++ b/arch/arm/include/asm/pmu.h > @@ -87,6 +87,7 @@ struct arm_pmu { > u64 max_period; > struct platform_device *plat_device; > struct pmu_hw_events *(*get_hw_events)(void); > + int no_overflow_interrupt; For the arm bits, we can actually use platform_get_irq on the platform device and avoid the need for a new field in here. Cheers, Will -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/