aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/perf_counter.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/perf_counter.h')
-rw-r--r--arch/powerpc/include/asm/perf_counter.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/perf_counter.h b/arch/powerpc/include/asm/perf_counter.h
index ceea76a48e3d..1c60f0ca7920 100644
--- a/arch/powerpc/include/asm/perf_counter.h
+++ b/arch/powerpc/include/asm/perf_counter.h
@@ -30,7 +30,7 @@ struct power_pmu {
30 u64 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)(u64 event); 32 int (*limited_pmc_event)(u64 event);
33 int limited_pmc5_6; /* PMC5 and PMC6 have limited function */ 33 u32 flags;
34 int n_generic; 34 int n_generic;
35 int *generic_events; 35 int *generic_events;
36}; 36};
@@ -38,12 +38,24 @@ struct power_pmu {
38extern struct power_pmu *ppmu; 38extern struct power_pmu *ppmu;
39 39
40/* 40/*
41 * Values for power_pmu.flags
42 */
43#define PPMU_LIMITED_PMC5_6 1 /* PMC5/6 have limited function */
44#define PPMU_ALT_SIPR 2 /* uses alternate posn for SIPR/HV */
45
46/*
41 * Values for flags to get_alternatives() 47 * Values for flags to get_alternatives()
42 */ 48 */
43#define PPMU_LIMITED_PMC_OK 1 /* can put this on a limited PMC */ 49#define PPMU_LIMITED_PMC_OK 1 /* can put this on a limited PMC */
44#define PPMU_LIMITED_PMC_REQD 2 /* have to put this on a limited PMC */ 50#define PPMU_LIMITED_PMC_REQD 2 /* have to put this on a limited PMC */
45#define PPMU_ONLY_COUNT_RUN 4 /* only counting in run state */ 51#define PPMU_ONLY_COUNT_RUN 4 /* only counting in run state */
46 52
53struct pt_regs;
54extern unsigned long perf_misc_flags(struct pt_regs *regs);
55#define perf_misc_flags(regs) perf_misc_flags(regs)
56
57extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
58
47/* 59/*
48 * The power_pmu.get_constraint function returns a 64-bit value and 60 * The power_pmu.get_constraint function returns a 64-bit value and
49 * a 64-bit mask that express the constraints between this event and 61 * a 64-bit mask that express the constraints between this event and