perf_counter: powerpc: use u64 for event codes internally
commitef923214a4816c289e4af2d67a9ebb1a31e4ac61
authorPaul Mackerras <paulus@samba.org>
Thu, 14 May 2009 03:29:14 +0000 (14 13:29 +1000)
committerIngo Molnar <mingo@elte.hu>
Fri, 15 May 2009 14:38:55 +0000 (15 16:38 +0200)
treebf850f4f53a4f8391b6b9c0335e58364668586d9
parent2e569d36729c8105ae066a9b105068305442cc77
perf_counter: powerpc: use u64 for event codes internally

Although the perf_counter API allows 63-bit raw event codes,
internally in the powerpc back-end we had been using 32-bit
event codes.  This expands them to 64 bits so that we can add
bits for specifying threshold start/stop events and instruction
sampling modes later.

This also corrects the return value of can_go_on_limited_pmc;
we were returning an event code rather than just a 0/1 value in
some circumstances. That didn't particularly matter while event
codes were 32-bit, but now that event codes are 64-bit it
might, so this fixes it.

[ Impact: extend PowerPC perfcounter interfaces from u32 to u64 ]

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <18955.36874.472452.353104@drongo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/powerpc/include/asm/perf_counter.h
arch/powerpc/kernel/perf_counter.c
arch/powerpc/kernel/power4-pmu.c
arch/powerpc/kernel/power5+-pmu.c
arch/powerpc/kernel/power5-pmu.c
arch/powerpc/kernel/power6-pmu.c
arch/powerpc/kernel/ppc970-pmu.c