[PATCH 1/2] ARM: perf: reset counters on all CPUs during initialisation

Will Deacon will.deacon at arm.com
Wed Mar 23 11:07:26 EDT 2011


> > I don't think this patch is safe for combined v6/v7 kernels because the
> > arch_initcall will try to poke the v7 PMU regardless of whether or not
> > it exists. I'll try and rework something and send another version to the
> > list.
> Ok. The new code should probably be called from *read_num_pmnc_events.

I thought that initially, but we need SMP up and running for the cross
calls. Since read_num_pmnc_events is called via an early_initcall, that's
not possible (which is the reason I used an arch_initcall in the first place).

The solution I've come up with is adding a ->reset function pointer to
struct arm_pmu, which can be called via an arch_initcall in perf_event.c
for the PMU it ends up using. I'll post it in a bit.

Will






More information about the linux-arm-kernel mailing list