diff options
author | Christoph Lameter <cl@linux.com> | 2014-08-17 13:30:51 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-08-26 13:45:55 -0400 |
commit | 81829a96869c8bad74a582705617e75758c4152d (patch) | |
tree | df49db5a3bafff04a30b22f513e40185e9aa7f93 /arch/tile | |
parent | b4f501916ce2ae80c28017814d71d1bf83679271 (diff) |
tile: Use this_cpu_ptr() for hardware counters
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/tile')
-rw-r--r-- | arch/tile/kernel/perf_event.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/tile/kernel/perf_event.c b/arch/tile/kernel/perf_event.c index 2bf6c9c135c1..bb509cee3b59 100644 --- a/arch/tile/kernel/perf_event.c +++ b/arch/tile/kernel/perf_event.c | |||
@@ -590,7 +590,7 @@ static int tile_event_set_period(struct perf_event *event) | |||
590 | */ | 590 | */ |
591 | static void tile_pmu_stop(struct perf_event *event, int flags) | 591 | static void tile_pmu_stop(struct perf_event *event, int flags) |
592 | { | 592 | { |
593 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 593 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
594 | struct hw_perf_event *hwc = &event->hw; | 594 | struct hw_perf_event *hwc = &event->hw; |
595 | int idx = hwc->idx; | 595 | int idx = hwc->idx; |
596 | 596 | ||
@@ -616,7 +616,7 @@ static void tile_pmu_stop(struct perf_event *event, int flags) | |||
616 | */ | 616 | */ |
617 | static void tile_pmu_start(struct perf_event *event, int flags) | 617 | static void tile_pmu_start(struct perf_event *event, int flags) |
618 | { | 618 | { |
619 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 619 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
620 | int idx = event->hw.idx; | 620 | int idx = event->hw.idx; |
621 | 621 | ||
622 | if (WARN_ON_ONCE(!(event->hw.state & PERF_HES_STOPPED))) | 622 | if (WARN_ON_ONCE(!(event->hw.state & PERF_HES_STOPPED))) |
@@ -650,7 +650,7 @@ static void tile_pmu_start(struct perf_event *event, int flags) | |||
650 | */ | 650 | */ |
651 | static int tile_pmu_add(struct perf_event *event, int flags) | 651 | static int tile_pmu_add(struct perf_event *event, int flags) |
652 | { | 652 | { |
653 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 653 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
654 | struct hw_perf_event *hwc; | 654 | struct hw_perf_event *hwc; |
655 | unsigned long mask; | 655 | unsigned long mask; |
656 | int b, max_cnt; | 656 | int b, max_cnt; |
@@ -706,7 +706,7 @@ static int tile_pmu_add(struct perf_event *event, int flags) | |||
706 | */ | 706 | */ |
707 | static void tile_pmu_del(struct perf_event *event, int flags) | 707 | static void tile_pmu_del(struct perf_event *event, int flags) |
708 | { | 708 | { |
709 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 709 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
710 | int i; | 710 | int i; |
711 | 711 | ||
712 | /* | 712 | /* |
@@ -880,14 +880,14 @@ static struct pmu tilera_pmu = { | |||
880 | int tile_pmu_handle_irq(struct pt_regs *regs, int fault) | 880 | int tile_pmu_handle_irq(struct pt_regs *regs, int fault) |
881 | { | 881 | { |
882 | struct perf_sample_data data; | 882 | struct perf_sample_data data; |
883 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 883 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
884 | struct perf_event *event; | 884 | struct perf_event *event; |
885 | struct hw_perf_event *hwc; | 885 | struct hw_perf_event *hwc; |
886 | u64 val; | 886 | u64 val; |
887 | unsigned long status; | 887 | unsigned long status; |
888 | int bit; | 888 | int bit; |
889 | 889 | ||
890 | __get_cpu_var(perf_irqs)++; | 890 | __this_cpu_inc(perf_irqs); |
891 | 891 | ||
892 | if (!atomic_read(&tile_active_events)) | 892 | if (!atomic_read(&tile_active_events)) |
893 | return 0; | 893 | return 0; |