]> git.karo-electronics.de Git - linux-beck.git/commit
ARM: 6902/1: perf: Remove erroneous check on active_events
authorMark Rutland <mark.rutland@arm.com>
Tue, 17 May 2011 08:15:38 +0000 (09:15 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 20 May 2011 21:39:17 +0000 (22:39 +0100)
commit57ce9bb39b476accf8fba6e16aea67ed76ea523d
tree8fb318ab6ffe5b05b691e452d85469ff7a187e04
parent31bee4cf0e74e9c962d481a68452debaf45ed4ac
ARM: 6902/1: perf: Remove erroneous check on active_events

When initialising a PMU, there is a check to protect against races with
other CPUs filling all of the available event slots. Since armpmu_add
checks that an event can be scheduled, we do not need to do this at
initialisation time. Furthermore the current code is broken because it
assumes that atomic_inc_not_zero will unconditionally increment
active_counts and then tries to decrement it again on failure.

This patch removes the broken, redundant code.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/perf_event.c