aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r--arch/x86/kernel/cpu/perf_event.c9
-rw-r--r--arch/x86/kernel/cpu/perf_event_p4.c2
2 files changed, 3 insertions, 8 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 3d3bceb9e830..c2c1e10f7b03 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -505,7 +505,7 @@ static int x86_pmu_hw_config(struct perf_event *event)
505 if (event->attr.type == PERF_TYPE_RAW) 505 if (event->attr.type == PERF_TYPE_RAW)
506 event->hw.config |= event->attr.config & X86_RAW_EVENT_MASK; 506 event->hw.config |= event->attr.config & X86_RAW_EVENT_MASK;
507 507
508 return 0; 508 return x86_setup_perfctr(event);
509} 509}
510 510
511/* 511/*
@@ -543,12 +543,7 @@ static int __hw_perf_event_init(struct perf_event *event)
543 event->hw.last_cpu = -1; 543 event->hw.last_cpu = -1;
544 event->hw.last_tag = ~0ULL; 544 event->hw.last_tag = ~0ULL;
545 545
546 /* Processor specifics */ 546 return x86_pmu.hw_config(event);
547 err = x86_pmu.hw_config(event);
548 if (err)
549 return err;
550
551 return x86_setup_perfctr(event);
552} 547}
553 548
554static void x86_pmu_disable_all(void) 549static void x86_pmu_disable_all(void)
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c
index 15367cce66bd..9e002054cb5f 100644
--- a/arch/x86/kernel/cpu/perf_event_p4.c
+++ b/arch/x86/kernel/cpu/perf_event_p4.c
@@ -455,7 +455,7 @@ static int p4_hw_config(struct perf_event *event)
455 (p4_config_pack_escr(P4_ESCR_MASK_HT) | 455 (p4_config_pack_escr(P4_ESCR_MASK_HT) |
456 p4_config_pack_cccr(P4_CCCR_MASK_HT)); 456 p4_config_pack_cccr(P4_CCCR_MASK_HT));
457 457
458 return 0; 458 return x86_setup_perfctr(event);
459} 459}
460 460
461static inline void p4_pmu_clear_cccr_ovf(struct hw_perf_event *hwc) 461static inline void p4_pmu_clear_cccr_ovf(struct hw_perf_event *hwc)