aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/perf_counter.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2009-05-13 23:29:14 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-15 10:38:55 -0400
commitef923214a4816c289e4af2d67a9ebb1a31e4ac61 (patch)
treebf850f4f53a4f8391b6b9c0335e58364668586d9 /arch/powerpc/include/asm/perf_counter.h
parent2e569d36729c8105ae066a9b105068305442cc77 (diff)
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>
Diffstat (limited to 'arch/powerpc/include/asm/perf_counter.h')
-rw-r--r--arch/powerpc/include/asm/perf_counter.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/include/asm/perf_counter.h b/arch/powerpc/include/asm/perf_counter.h
index 56d66c38143..ceea76a48e3 100644
--- a/arch/powerpc/include/asm/perf_counter.h
+++ b/arch/powerpc/include/asm/perf_counter.h
@@ -23,13 +23,13 @@ struct power_pmu {
23 int max_alternatives; 23 int max_alternatives;
24 u64 add_fields; 24 u64 add_fields;
25 u64 test_adder; 25 u64 test_adder;
26 int (*compute_mmcr)(unsigned int events[], int n_ev, 26 int (*compute_mmcr)(u64 events[], int n_ev,
27 unsigned int hwc[], u64 mmcr[]); 27 unsigned int hwc[], u64 mmcr[]);
28 int (*get_constraint)(unsigned int event, u64 *mskp, u64 *valp); 28 int (*get_constraint)(u64 event, u64 *mskp, u64 *valp);
29 int (*get_alternatives)(unsigned int event, unsigned int flags, 29 int (*get_alternatives)(u64 event, unsigned int flags,
30 unsigned int alt[]); 30 u64 alt[]);
31 void (*disable_pmc)(unsigned int pmc, u64 mmcr[]); 31 void (*disable_pmc)(unsigned int pmc, u64 mmcr[]);
32 int (*limited_pmc_event)(unsigned int event); 32 int (*limited_pmc_event)(u64 event);
33 int limited_pmc5_6; /* PMC5 and PMC6 have limited function */ 33 int limited_pmc5_6; /* PMC5 and PMC6 have limited function */
34 int n_generic; 34 int n_generic;
35 int *generic_events; 35 int *generic_events;