aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/perf_event_intel_ds.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event_intel_ds.c')
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_ds.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_ds.c b/arch/x86/kernel/cpu/perf_event_intel_ds.c
index b1553d05a5cb..46211bcc813e 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_ds.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c
@@ -474,7 +474,7 @@ void intel_pmu_enable_bts(u64 config)
474 474
475void intel_pmu_disable_bts(void) 475void intel_pmu_disable_bts(void)
476{ 476{
477 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 477 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
478 unsigned long debugctlmsr; 478 unsigned long debugctlmsr;
479 479
480 if (!cpuc->ds) 480 if (!cpuc->ds)
@@ -491,7 +491,7 @@ void intel_pmu_disable_bts(void)
491 491
492int intel_pmu_drain_bts_buffer(void) 492int intel_pmu_drain_bts_buffer(void)
493{ 493{
494 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 494 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
495 struct debug_store *ds = cpuc->ds; 495 struct debug_store *ds = cpuc->ds;
496 struct bts_record { 496 struct bts_record {
497 u64 from; 497 u64 from;
@@ -669,7 +669,7 @@ struct event_constraint *intel_pebs_constraints(struct perf_event *event)
669 669
670void intel_pmu_pebs_enable(struct perf_event *event) 670void intel_pmu_pebs_enable(struct perf_event *event)
671{ 671{
672 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 672 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
673 struct hw_perf_event *hwc = &event->hw; 673 struct hw_perf_event *hwc = &event->hw;
674 674
675 hwc->config &= ~ARCH_PERFMON_EVENTSEL_INT; 675 hwc->config &= ~ARCH_PERFMON_EVENTSEL_INT;
@@ -684,7 +684,7 @@ void intel_pmu_pebs_enable(struct perf_event *event)
684 684
685void intel_pmu_pebs_disable(struct perf_event *event) 685void intel_pmu_pebs_disable(struct perf_event *event)
686{ 686{
687 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 687 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
688 struct hw_perf_event *hwc = &event->hw; 688 struct hw_perf_event *hwc = &event->hw;
689 689
690 cpuc->pebs_enabled &= ~(1ULL << hwc->idx); 690 cpuc->pebs_enabled &= ~(1ULL << hwc->idx);
@@ -702,7 +702,7 @@ void intel_pmu_pebs_disable(struct perf_event *event)
702 702
703void intel_pmu_pebs_enable_all(void) 703void intel_pmu_pebs_enable_all(void)
704{ 704{
705 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 705 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
706 706
707 if (cpuc->pebs_enabled) 707 if (cpuc->pebs_enabled)
708 wrmsrl(MSR_IA32_PEBS_ENABLE, cpuc->pebs_enabled); 708 wrmsrl(MSR_IA32_PEBS_ENABLE, cpuc->pebs_enabled);
@@ -710,7 +710,7 @@ void intel_pmu_pebs_enable_all(void)
710 710
711void intel_pmu_pebs_disable_all(void) 711void intel_pmu_pebs_disable_all(void)
712{ 712{
713 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 713 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
714 714
715 if (cpuc->pebs_enabled) 715 if (cpuc->pebs_enabled)
716 wrmsrl(MSR_IA32_PEBS_ENABLE, 0); 716 wrmsrl(MSR_IA32_PEBS_ENABLE, 0);
@@ -718,7 +718,7 @@ void intel_pmu_pebs_disable_all(void)
718 718
719static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs) 719static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
720{ 720{
721 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 721 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
722 unsigned long from = cpuc->lbr_entries[0].from; 722 unsigned long from = cpuc->lbr_entries[0].from;
723 unsigned long old_to, to = cpuc->lbr_entries[0].to; 723 unsigned long old_to, to = cpuc->lbr_entries[0].to;
724 unsigned long ip = regs->ip; 724 unsigned long ip = regs->ip;
@@ -829,7 +829,7 @@ static void __intel_pmu_pebs_event(struct perf_event *event,
829 * We cast to the biggest pebs_record but are careful not to 829 * We cast to the biggest pebs_record but are careful not to
830 * unconditionally access the 'extra' entries. 830 * unconditionally access the 'extra' entries.
831 */ 831 */
832 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 832 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
833 struct pebs_record_hsw *pebs = __pebs; 833 struct pebs_record_hsw *pebs = __pebs;
834 struct perf_sample_data data; 834 struct perf_sample_data data;
835 struct pt_regs regs; 835 struct pt_regs regs;
@@ -916,7 +916,7 @@ static void __intel_pmu_pebs_event(struct perf_event *event,
916 916
917static void intel_pmu_drain_pebs_core(struct pt_regs *iregs) 917static void intel_pmu_drain_pebs_core(struct pt_regs *iregs)
918{ 918{
919 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 919 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
920 struct debug_store *ds = cpuc->ds; 920 struct debug_store *ds = cpuc->ds;
921 struct perf_event *event = cpuc->events[0]; /* PMC0 only */ 921 struct perf_event *event = cpuc->events[0]; /* PMC0 only */
922 struct pebs_record_core *at, *top; 922 struct pebs_record_core *at, *top;
@@ -957,7 +957,7 @@ static void intel_pmu_drain_pebs_core(struct pt_regs *iregs)
957 957
958static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs) 958static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs)
959{ 959{
960 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); 960 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
961 struct debug_store *ds = cpuc->ds; 961 struct debug_store *ds = cpuc->ds;
962 struct perf_event *event = NULL; 962 struct perf_event *event = NULL;
963 void *at, *top; 963 void *at, *top;