On 01/08/2019 14:01, Will Deacon wrote: > [typo in subject: resore ->restore] > > On Wed, Jul 17, 2019 at 09:17:06AM +0100, Julien Thierry wrote: >> The callback pmu->read() can be called with interrupts enabled. >> Currently, on ARM, this can cause the following callchain: >> >> armpmu_read() -> armpmu_event_update() -> armv7pmu_read_counter() > > Why can't we just disable irqs in armv7pmu_read_counter() ? > We could. But since we get rid of the lock after (otherwise it is the only reason we have to keep the lock) we might as well find another solution. Thanks, -- Julien Thierry