]> git.karo-electronics.de Git - karo-tx-linux.git/commit
MIPS/Perf-events: Remove pmu and event state checking in validate_event()
authorDeng-Cheng Zhu <dczhu@mips.com>
Mon, 21 Nov 2011 19:28:47 +0000 (03:28 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 22 Nov 2011 13:45:20 +0000 (13:45 +0000)
commitc481e48d947833f946770f233d36506dacd6ecb6
tree26478862e71301a5f1506f011afc91fb11137e26
parentf40c522a4216269dd1d6aa8403f6e0a5e41346ec
MIPS/Perf-events: Remove pmu and event state checking in validate_event()

Why removing pmu checking:
Since 3.2-rc1, when arch level event init is called, the event is already
connected to its PMU. Also, validate_event() is _only_ called by
validate_group() in event init, so there is no need of checking or
temporarily assigning event pmu during validate_group().

Why removing event state checking:
Events could be created in PERF_EVENT_STATE_OFF (attr->disabled == 1), when
these events go through this checking, validate_group() does dummy work.
But we do need to do group scheduling emulation for them in event init.
Again, validate_event() is _only_ called by validate_group().

Reference: http://www.spinics.net/lists/mips/msg42190.html
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/3108/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/perf_event_mipsxx.c