aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/perf_event_server.h
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2013-06-28 04:15:16 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-06-30 21:50:10 -0400
commit330a1eb7775ba876dbd46b9885556e57f705e3d4 (patch)
tree138693772ff043ec23e335a1ef42df7a7d5707ba /arch/powerpc/include/asm/perf_event_server.h
parent2ac138ca21ad26c988ce7c91d27327f85beb7519 (diff)
powerpc/perf: Core EBB support for 64-bit book3s
Add support for EBB (Event Based Branches) on 64-bit book3s. See the included documentation for more details. EBBs are a feature which allows the hardware to branch directly to a specified user space address when a PMU event overflows. This can be used by programs for self-monitoring with no kernel involvement in the inner loop. Most of the logic is in the generic book3s code, primarily to avoid a proliferation of PMU callbacks. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/perf_event_server.h')
-rw-r--r--arch/powerpc/include/asm/perf_event_server.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/perf_event_server.h b/arch/powerpc/include/asm/perf_event_server.h
index f265049dd7d6..2dd7bfc459be 100644
--- a/arch/powerpc/include/asm/perf_event_server.h
+++ b/arch/powerpc/include/asm/perf_event_server.h
@@ -60,6 +60,7 @@ struct power_pmu {
60#define PPMU_HAS_SSLOT 0x00000020 /* Has sampled slot in MMCRA */ 60#define PPMU_HAS_SSLOT 0x00000020 /* Has sampled slot in MMCRA */
61#define PPMU_HAS_SIER 0x00000040 /* Has SIER */ 61#define PPMU_HAS_SIER 0x00000040 /* Has SIER */
62#define PPMU_BHRB 0x00000080 /* has BHRB feature enabled */ 62#define PPMU_BHRB 0x00000080 /* has BHRB feature enabled */
63#define PPMU_EBB 0x00000100 /* supports event based branch */
63 64
64/* 65/*
65 * Values for flags to get_alternatives() 66 * Values for flags to get_alternatives()
@@ -68,6 +69,11 @@ struct power_pmu {
68#define PPMU_LIMITED_PMC_REQD 2 /* have to put this on a limited PMC */ 69#define PPMU_LIMITED_PMC_REQD 2 /* have to put this on a limited PMC */
69#define PPMU_ONLY_COUNT_RUN 4 /* only counting in run state */ 70#define PPMU_ONLY_COUNT_RUN 4 /* only counting in run state */
70 71
72/*
73 * We use the event config bit 63 as a flag to request EBB.
74 */
75#define EVENT_CONFIG_EBB_SHIFT 63
76
71extern int register_power_pmu(struct power_pmu *); 77extern int register_power_pmu(struct power_pmu *);
72 78
73struct pt_regs; 79struct pt_regs;