]> git.baikalelectronics.ru Git - kernel.git/commit
bus: arm-ccn: fix hrtimer registration
authorMark Rutland <mark.rutland@arm.com>
Thu, 11 Aug 2016 09:50:42 +0000 (10:50 +0100)
committerPawel Moll <pawel.moll@arm.com>
Fri, 26 Aug 2016 08:16:13 +0000 (09:16 +0100)
commit65b5b9dc3d62fd0040065ccf1aa55b319847f581
tree1e1a1d6f3b2b1c48fe8e15bd4c08792ccee9821a
parent77f558b5bf79916bfc673814436067aa982dc79b
bus: arm-ccn: fix hrtimer registration

The CCN PMU driver has a single hrtimer, used to simulate a periodic
interrupt on systems where the overflow interrupt is not possible to
use. The hrtimer is started when any event is started, and cancelled when
any event is stopped. Thus, stopping a single event is sufficient to
disable to hrtimer, and overflows (of other events) may be lost.

To avoid this, this patch reworks the hrtimer start/cancel to only occur
when the first event is added to a PMU, and the last event removed,
making use of the existing bitmap counting active events.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
drivers/bus/arm-ccn.c