]> git.karo-electronics.de Git - karo-tx-linux.git/commit
MIPS/Perf-events: Remove erroneous check on active_events
authorDeng-Cheng Zhu <dczhu@mips.com>
Mon, 21 Nov 2011 19:28:46 +0000 (03:28 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 22 Nov 2011 13:45:19 +0000 (13:45 +0000)
commitf40c522a4216269dd1d6aa8403f6e0a5e41346ec
tree58b2f70a2a64a21661f1dce3001bcb3a81c2a661
parent6ff96fdc1405abde98983b3954b1a83c77d66c08
MIPS/Perf-events: Remove erroneous check on active_events

Port the following patch for ARM by Mark Rutland:

57ce9bb39b476accf8fba6e16aea67ed76ea523d
    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: Deng-Cheng Zhu <dczhu@mips.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: David Daney <david.daney@cavium.com>
Cc: Eyal Barzilay <eyal@mips.com>
Cc: Zenon Fortuna <zenon@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/3106/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/perf_event_mipsxx.c