diff options
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event_intel_ds.c')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_ds.c | 20 |
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 696ade311ded..7b786b369789 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_ds.c +++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c | |||
@@ -475,7 +475,7 @@ void intel_pmu_enable_bts(u64 config) | |||
475 | 475 | ||
476 | void intel_pmu_disable_bts(void) | 476 | void intel_pmu_disable_bts(void) |
477 | { | 477 | { |
478 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 478 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
479 | unsigned long debugctlmsr; | 479 | unsigned long debugctlmsr; |
480 | 480 | ||
481 | if (!cpuc->ds) | 481 | if (!cpuc->ds) |
@@ -492,7 +492,7 @@ void intel_pmu_disable_bts(void) | |||
492 | 492 | ||
493 | int intel_pmu_drain_bts_buffer(void) | 493 | int intel_pmu_drain_bts_buffer(void) |
494 | { | 494 | { |
495 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 495 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
496 | struct debug_store *ds = cpuc->ds; | 496 | struct debug_store *ds = cpuc->ds; |
497 | struct bts_record { | 497 | struct bts_record { |
498 | u64 from; | 498 | u64 from; |
@@ -712,7 +712,7 @@ struct event_constraint *intel_pebs_constraints(struct perf_event *event) | |||
712 | 712 | ||
713 | void intel_pmu_pebs_enable(struct perf_event *event) | 713 | void intel_pmu_pebs_enable(struct perf_event *event) |
714 | { | 714 | { |
715 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 715 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
716 | struct hw_perf_event *hwc = &event->hw; | 716 | struct hw_perf_event *hwc = &event->hw; |
717 | 717 | ||
718 | hwc->config &= ~ARCH_PERFMON_EVENTSEL_INT; | 718 | hwc->config &= ~ARCH_PERFMON_EVENTSEL_INT; |
@@ -727,7 +727,7 @@ void intel_pmu_pebs_enable(struct perf_event *event) | |||
727 | 727 | ||
728 | void intel_pmu_pebs_disable(struct perf_event *event) | 728 | void intel_pmu_pebs_disable(struct perf_event *event) |
729 | { | 729 | { |
730 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 730 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
731 | struct hw_perf_event *hwc = &event->hw; | 731 | struct hw_perf_event *hwc = &event->hw; |
732 | 732 | ||
733 | cpuc->pebs_enabled &= ~(1ULL << hwc->idx); | 733 | cpuc->pebs_enabled &= ~(1ULL << hwc->idx); |
@@ -745,7 +745,7 @@ void intel_pmu_pebs_disable(struct perf_event *event) | |||
745 | 745 | ||
746 | void intel_pmu_pebs_enable_all(void) | 746 | void intel_pmu_pebs_enable_all(void) |
747 | { | 747 | { |
748 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 748 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
749 | 749 | ||
750 | if (cpuc->pebs_enabled) | 750 | if (cpuc->pebs_enabled) |
751 | wrmsrl(MSR_IA32_PEBS_ENABLE, cpuc->pebs_enabled); | 751 | wrmsrl(MSR_IA32_PEBS_ENABLE, cpuc->pebs_enabled); |
@@ -753,7 +753,7 @@ void intel_pmu_pebs_enable_all(void) | |||
753 | 753 | ||
754 | void intel_pmu_pebs_disable_all(void) | 754 | void intel_pmu_pebs_disable_all(void) |
755 | { | 755 | { |
756 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 756 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
757 | 757 | ||
758 | if (cpuc->pebs_enabled) | 758 | if (cpuc->pebs_enabled) |
759 | wrmsrl(MSR_IA32_PEBS_ENABLE, 0); | 759 | wrmsrl(MSR_IA32_PEBS_ENABLE, 0); |
@@ -761,7 +761,7 @@ void intel_pmu_pebs_disable_all(void) | |||
761 | 761 | ||
762 | static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs) | 762 | static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs) |
763 | { | 763 | { |
764 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 764 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
765 | unsigned long from = cpuc->lbr_entries[0].from; | 765 | unsigned long from = cpuc->lbr_entries[0].from; |
766 | unsigned long old_to, to = cpuc->lbr_entries[0].to; | 766 | unsigned long old_to, to = cpuc->lbr_entries[0].to; |
767 | unsigned long ip = regs->ip; | 767 | unsigned long ip = regs->ip; |
@@ -868,7 +868,7 @@ static void __intel_pmu_pebs_event(struct perf_event *event, | |||
868 | * We cast to the biggest pebs_record but are careful not to | 868 | * We cast to the biggest pebs_record but are careful not to |
869 | * unconditionally access the 'extra' entries. | 869 | * unconditionally access the 'extra' entries. |
870 | */ | 870 | */ |
871 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 871 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
872 | struct pebs_record_hsw *pebs = __pebs; | 872 | struct pebs_record_hsw *pebs = __pebs; |
873 | struct perf_sample_data data; | 873 | struct perf_sample_data data; |
874 | struct pt_regs regs; | 874 | struct pt_regs regs; |
@@ -957,7 +957,7 @@ static void __intel_pmu_pebs_event(struct perf_event *event, | |||
957 | 957 | ||
958 | static void intel_pmu_drain_pebs_core(struct pt_regs *iregs) | 958 | static void intel_pmu_drain_pebs_core(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 = cpuc->events[0]; /* PMC0 only */ | 962 | struct perf_event *event = cpuc->events[0]; /* PMC0 only */ |
963 | struct pebs_record_core *at, *top; | 963 | struct pebs_record_core *at, *top; |
@@ -998,7 +998,7 @@ static void intel_pmu_drain_pebs_core(struct pt_regs *iregs) | |||
998 | 998 | ||
999 | static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs) | 999 | static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs) |
1000 | { | 1000 | { |
1001 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 1001 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
1002 | struct debug_store *ds = cpuc->ds; | 1002 | struct debug_store *ds = cpuc->ds; |
1003 | struct perf_event *event = NULL; | 1003 | struct perf_event *event = NULL; |
1004 | void *at, *top; | 1004 | void *at, *top; |