diff options
author | Peter Zijlstra <peterz@infradead.org> | 2015-03-05 16:10:19 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-23 05:58:04 -0400 |
commit | 50f16a8bf9d7a92c437ed1867d0f7e1dc6a9aca9 (patch) | |
tree | b3794dc4959e7dedbdddfb1e428c4fe67126e45b /arch | |
parent | 4e16ed99416ef569a89782a7234f95007919fadd (diff) |
perf: Remove type specific target pointers
The only reason CQM had to use a hard-coded pmu type was so it could use
cqm_target in hw_perf_event.
Do away with the {tp,bp,cqm}_target pointers and provide a non type
specific one.
This allows us to do away with that silly pmu type as well.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Vince Weaver <vince@deater.net>
Cc: acme@kernel.org
Cc: acme@redhat.com
Cc: hpa@zytor.com
Cc: jolsa@redhat.com
Cc: kanaka.d.juvva@intel.com
Cc: matt.fleming@intel.com
Cc: tglx@linutronix.de
Cc: torvalds@linux-foundation.org
Cc: vikas.shivappa@linux.intel.com
Link: http://lkml.kernel.org/r/20150305211019.GU21418@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/hw_breakpoint.c | 2 | ||||
-rw-r--r-- | arch/arm64/kernel/hw_breakpoint.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_cqm.c | 7 |
3 files changed, 5 insertions, 6 deletions
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index 7fc70ae21185..dc7d0a95bd36 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c | |||
@@ -648,7 +648,7 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp) | |||
648 | * Per-cpu breakpoints are not supported by our stepping | 648 | * Per-cpu breakpoints are not supported by our stepping |
649 | * mechanism. | 649 | * mechanism. |
650 | */ | 650 | */ |
651 | if (!bp->hw.bp_target) | 651 | if (!bp->hw.target) |
652 | return -EINVAL; | 652 | return -EINVAL; |
653 | 653 | ||
654 | /* | 654 | /* |
diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c index df1cf15377b4..d062f35911c2 100644 --- a/arch/arm64/kernel/hw_breakpoint.c +++ b/arch/arm64/kernel/hw_breakpoint.c | |||
@@ -527,7 +527,7 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp) | |||
527 | * Disallow per-task kernel breakpoints since these would | 527 | * Disallow per-task kernel breakpoints since these would |
528 | * complicate the stepping code. | 528 | * complicate the stepping code. |
529 | */ | 529 | */ |
530 | if (info->ctrl.privilege == AARCH64_BREAKPOINT_EL1 && bp->hw.bp_target) | 530 | if (info->ctrl.privilege == AARCH64_BREAKPOINT_EL1 && bp->hw.target) |
531 | return -EINVAL; | 531 | return -EINVAL; |
532 | 532 | ||
533 | return 0; | 533 | return 0; |
diff --git a/arch/x86/kernel/cpu/perf_event_intel_cqm.c b/arch/x86/kernel/cpu/perf_event_intel_cqm.c index 9a8ef8376fcd..e4d1b8b738fa 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_cqm.c +++ b/arch/x86/kernel/cpu/perf_event_intel_cqm.c | |||
@@ -263,7 +263,7 @@ static bool __match_event(struct perf_event *a, struct perf_event *b) | |||
263 | /* | 263 | /* |
264 | * Events that target same task are placed into the same cache group. | 264 | * Events that target same task are placed into the same cache group. |
265 | */ | 265 | */ |
266 | if (a->hw.cqm_target == b->hw.cqm_target) | 266 | if (a->hw.target == b->hw.target) |
267 | return true; | 267 | return true; |
268 | 268 | ||
269 | /* | 269 | /* |
@@ -279,7 +279,7 @@ static bool __match_event(struct perf_event *a, struct perf_event *b) | |||
279 | static inline struct perf_cgroup *event_to_cgroup(struct perf_event *event) | 279 | static inline struct perf_cgroup *event_to_cgroup(struct perf_event *event) |
280 | { | 280 | { |
281 | if (event->attach_state & PERF_ATTACH_TASK) | 281 | if (event->attach_state & PERF_ATTACH_TASK) |
282 | return perf_cgroup_from_task(event->hw.cqm_target); | 282 | return perf_cgroup_from_task(event->hw.target); |
283 | 283 | ||
284 | return event->cgrp; | 284 | return event->cgrp; |
285 | } | 285 | } |
@@ -1365,8 +1365,7 @@ static int __init intel_cqm_init(void) | |||
1365 | 1365 | ||
1366 | __perf_cpu_notifier(intel_cqm_cpu_notifier); | 1366 | __perf_cpu_notifier(intel_cqm_cpu_notifier); |
1367 | 1367 | ||
1368 | ret = perf_pmu_register(&intel_cqm_pmu, "intel_cqm", | 1368 | ret = perf_pmu_register(&intel_cqm_pmu, "intel_cqm", -1); |
1369 | PERF_TYPE_INTEL_CQM); | ||
1370 | if (ret) | 1369 | if (ret) |
1371 | pr_err("Intel CQM perf registration failed: %d\n", ret); | 1370 | pr_err("Intel CQM perf registration failed: %d\n", ret); |
1372 | else | 1371 | else |