perf: Don't use -ENOSPC for out of PMU resources
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 9 Nov 2011 16:56:37 +0000 (17:56 +0100)
committerIngo Molnar <mingo@elte.hu>
Mon, 14 Nov 2011 12:01:24 +0000 (13:01 +0100)
commitaa2bc1ade59003a379ffc485d6da2d92ea3370a6
tree6d3551cbc594f6827682db9ab931e6e22a37fd6a
parent1d5f003f5a964711853514b04ddc872eec0fdc7b
perf: Don't use -ENOSPC for out of PMU resources

People (Linus) objected to using -ENOSPC to signal not having enough
resources on the PMU to satisfy the request. Use -EINVAL.

Requested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Cc: David Daney <david.daney@cavium.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-xv8geaz2zpbjhlx0svmpp28n@git.kernel.org
[ merged to newer kernel, fixed up MIPS impact ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/arm/kernel/perf_event.c
arch/mips/kernel/perf_event_mipsxx.c
arch/x86/kernel/cpu/perf_event.c
arch/x86/kernel/cpu/perf_event_p4.c