diff options
Diffstat (limited to 'arch/sparc/kernel/perf_event.c')
-rw-r--r-- | arch/sparc/kernel/perf_event.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index d35c490a91cb..264049a6cb74 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -1013,7 +1013,7 @@ static void update_pcrs_for_enable(struct cpu_hw_events *cpuc) | |||
1013 | 1013 | ||
1014 | static void sparc_pmu_enable(struct pmu *pmu) | 1014 | static void sparc_pmu_enable(struct pmu *pmu) |
1015 | { | 1015 | { |
1016 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 1016 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
1017 | int i; | 1017 | int i; |
1018 | 1018 | ||
1019 | if (cpuc->enabled) | 1019 | if (cpuc->enabled) |
@@ -1031,7 +1031,7 @@ static void sparc_pmu_enable(struct pmu *pmu) | |||
1031 | 1031 | ||
1032 | static void sparc_pmu_disable(struct pmu *pmu) | 1032 | static void sparc_pmu_disable(struct pmu *pmu) |
1033 | { | 1033 | { |
1034 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 1034 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
1035 | int i; | 1035 | int i; |
1036 | 1036 | ||
1037 | if (!cpuc->enabled) | 1037 | if (!cpuc->enabled) |
@@ -1065,7 +1065,7 @@ static int active_event_index(struct cpu_hw_events *cpuc, | |||
1065 | 1065 | ||
1066 | static void sparc_pmu_start(struct perf_event *event, int flags) | 1066 | static void sparc_pmu_start(struct perf_event *event, int flags) |
1067 | { | 1067 | { |
1068 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 1068 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
1069 | int idx = active_event_index(cpuc, event); | 1069 | int idx = active_event_index(cpuc, event); |
1070 | 1070 | ||
1071 | if (flags & PERF_EF_RELOAD) { | 1071 | if (flags & PERF_EF_RELOAD) { |
@@ -1080,7 +1080,7 @@ static void sparc_pmu_start(struct perf_event *event, int flags) | |||
1080 | 1080 | ||
1081 | static void sparc_pmu_stop(struct perf_event *event, int flags) | 1081 | static void sparc_pmu_stop(struct perf_event *event, int flags) |
1082 | { | 1082 | { |
1083 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 1083 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
1084 | int idx = active_event_index(cpuc, event); | 1084 | int idx = active_event_index(cpuc, event); |
1085 | 1085 | ||
1086 | if (!(event->hw.state & PERF_HES_STOPPED)) { | 1086 | if (!(event->hw.state & PERF_HES_STOPPED)) { |
@@ -1096,7 +1096,7 @@ static void sparc_pmu_stop(struct perf_event *event, int flags) | |||
1096 | 1096 | ||
1097 | static void sparc_pmu_del(struct perf_event *event, int _flags) | 1097 | static void sparc_pmu_del(struct perf_event *event, int _flags) |
1098 | { | 1098 | { |
1099 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 1099 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
1100 | unsigned long flags; | 1100 | unsigned long flags; |
1101 | int i; | 1101 | int i; |
1102 | 1102 | ||
@@ -1133,7 +1133,7 @@ static void sparc_pmu_del(struct perf_event *event, int _flags) | |||
1133 | 1133 | ||
1134 | static void sparc_pmu_read(struct perf_event *event) | 1134 | static void sparc_pmu_read(struct perf_event *event) |
1135 | { | 1135 | { |
1136 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 1136 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
1137 | int idx = active_event_index(cpuc, event); | 1137 | int idx = active_event_index(cpuc, event); |
1138 | struct hw_perf_event *hwc = &event->hw; | 1138 | struct hw_perf_event *hwc = &event->hw; |
1139 | 1139 | ||
@@ -1145,7 +1145,7 @@ static DEFINE_MUTEX(pmc_grab_mutex); | |||
1145 | 1145 | ||
1146 | static void perf_stop_nmi_watchdog(void *unused) | 1146 | static void perf_stop_nmi_watchdog(void *unused) |
1147 | { | 1147 | { |
1148 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 1148 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
1149 | int i; | 1149 | int i; |
1150 | 1150 | ||
1151 | stop_nmi_watchdog(NULL); | 1151 | stop_nmi_watchdog(NULL); |
@@ -1356,7 +1356,7 @@ static int collect_events(struct perf_event *group, int max_count, | |||
1356 | 1356 | ||
1357 | static int sparc_pmu_add(struct perf_event *event, int ef_flags) | 1357 | static int sparc_pmu_add(struct perf_event *event, int ef_flags) |
1358 | { | 1358 | { |
1359 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 1359 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
1360 | int n0, ret = -EAGAIN; | 1360 | int n0, ret = -EAGAIN; |
1361 | unsigned long flags; | 1361 | unsigned long flags; |
1362 | 1362 | ||
@@ -1498,7 +1498,7 @@ static int sparc_pmu_event_init(struct perf_event *event) | |||
1498 | */ | 1498 | */ |
1499 | static void sparc_pmu_start_txn(struct pmu *pmu) | 1499 | static void sparc_pmu_start_txn(struct pmu *pmu) |
1500 | { | 1500 | { |
1501 | struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); | 1501 | struct cpu_hw_events *cpuhw = this_cpu_ptr(&cpu_hw_events); |
1502 | 1502 | ||
1503 | perf_pmu_disable(pmu); | 1503 | perf_pmu_disable(pmu); |
1504 | cpuhw->group_flag |= PERF_EVENT_TXN; | 1504 | cpuhw->group_flag |= PERF_EVENT_TXN; |
@@ -1511,7 +1511,7 @@ static void sparc_pmu_start_txn(struct pmu *pmu) | |||
1511 | */ | 1511 | */ |
1512 | static void sparc_pmu_cancel_txn(struct pmu *pmu) | 1512 | static void sparc_pmu_cancel_txn(struct pmu *pmu) |
1513 | { | 1513 | { |
1514 | struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); | 1514 | struct cpu_hw_events *cpuhw = this_cpu_ptr(&cpu_hw_events); |
1515 | 1515 | ||
1516 | cpuhw->group_flag &= ~PERF_EVENT_TXN; | 1516 | cpuhw->group_flag &= ~PERF_EVENT_TXN; |
1517 | perf_pmu_enable(pmu); | 1517 | perf_pmu_enable(pmu); |
@@ -1524,13 +1524,13 @@ static void sparc_pmu_cancel_txn(struct pmu *pmu) | |||
1524 | */ | 1524 | */ |
1525 | static int sparc_pmu_commit_txn(struct pmu *pmu) | 1525 | static int sparc_pmu_commit_txn(struct pmu *pmu) |
1526 | { | 1526 | { |
1527 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | 1527 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
1528 | int n; | 1528 | int n; |
1529 | 1529 | ||
1530 | if (!sparc_pmu) | 1530 | if (!sparc_pmu) |
1531 | return -EINVAL; | 1531 | return -EINVAL; |
1532 | 1532 | ||
1533 | cpuc = &__get_cpu_var(cpu_hw_events); | 1533 | cpuc = this_cpu_ptr(&cpu_hw_events); |
1534 | n = cpuc->n_events; | 1534 | n = cpuc->n_events; |
1535 | if (check_excludes(cpuc->event, 0, n)) | 1535 | if (check_excludes(cpuc->event, 0, n)) |
1536 | return -EINVAL; | 1536 | return -EINVAL; |
@@ -1601,7 +1601,7 @@ static int __kprobes perf_event_nmi_handler(struct notifier_block *self, | |||
1601 | 1601 | ||
1602 | regs = args->regs; | 1602 | regs = args->regs; |
1603 | 1603 | ||
1604 | cpuc = &__get_cpu_var(cpu_hw_events); | 1604 | cpuc = this_cpu_ptr(&cpu_hw_events); |
1605 | 1605 | ||
1606 | /* If the PMU has the TOE IRQ enable bits, we need to do a | 1606 | /* If the PMU has the TOE IRQ enable bits, we need to do a |
1607 | * dummy write to the %pcr to clear the overflow bits and thus | 1607 | * dummy write to the %pcr to clear the overflow bits and thus |