diff options
Diffstat (limited to 'arch/powerpc/perf/core-book3s.c')
-rw-r--r-- | arch/powerpc/perf/core-book3s.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index a6995d4e93d4..7c4f6690533a 100644 --- a/arch/powerpc/perf/core-book3s.c +++ b/arch/powerpc/perf/core-book3s.c | |||
@@ -339,7 +339,7 @@ static void power_pmu_bhrb_reset(void) | |||
339 | 339 | ||
340 | static void power_pmu_bhrb_enable(struct perf_event *event) | 340 | static void power_pmu_bhrb_enable(struct perf_event *event) |
341 | { | 341 | { |
342 | struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); | 342 | struct cpu_hw_events *cpuhw = this_cpu_ptr(&cpu_hw_events); |
343 | 343 | ||
344 | if (!ppmu->bhrb_nr) | 344 | if (!ppmu->bhrb_nr) |
345 | return; | 345 | return; |
@@ -354,7 +354,7 @@ static void power_pmu_bhrb_enable(struct perf_event *event) | |||
354 | 354 | ||
355 | static void power_pmu_bhrb_disable(struct perf_event *event) | 355 | static void power_pmu_bhrb_disable(struct perf_event *event) |
356 | { | 356 | { |
357 | struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); | 357 | struct cpu_hw_events *cpuhw = this_cpu_ptr(&cpu_hw_events); |
358 | 358 | ||
359 | if (!ppmu->bhrb_nr) | 359 | if (!ppmu->bhrb_nr) |
360 | return; | 360 | return; |
@@ -1144,7 +1144,7 @@ static void power_pmu_disable(struct pmu *pmu) | |||
1144 | if (!ppmu) | 1144 | if (!ppmu) |
1145 | return; | 1145 | return; |
1146 | local_irq_save(flags); | 1146 | local_irq_save(flags); |
1147 | cpuhw = &__get_cpu_var(cpu_hw_events); | 1147 | cpuhw = this_cpu_ptr(&cpu_hw_events); |
1148 | 1148 | ||
1149 | if (!cpuhw->disabled) { | 1149 | if (!cpuhw->disabled) { |
1150 | /* | 1150 | /* |
@@ -1211,7 +1211,7 @@ static void power_pmu_enable(struct pmu *pmu) | |||
1211 | return; | 1211 | return; |
1212 | local_irq_save(flags); | 1212 | local_irq_save(flags); |
1213 | 1213 | ||
1214 | cpuhw = &__get_cpu_var(cpu_hw_events); | 1214 | cpuhw = this_cpu_ptr(&cpu_hw_events); |
1215 | if (!cpuhw->disabled) | 1215 | if (!cpuhw->disabled) |
1216 | goto out; | 1216 | goto out; |
1217 | 1217 | ||
@@ -1403,7 +1403,7 @@ static int power_pmu_add(struct perf_event *event, int ef_flags) | |||
1403 | * Add the event to the list (if there is room) | 1403 | * Add the event to the list (if there is room) |
1404 | * and check whether the total set is still feasible. | 1404 | * and check whether the total set is still feasible. |
1405 | */ | 1405 | */ |
1406 | cpuhw = &__get_cpu_var(cpu_hw_events); | 1406 | cpuhw = this_cpu_ptr(&cpu_hw_events); |
1407 | n0 = cpuhw->n_events; | 1407 | n0 = cpuhw->n_events; |
1408 | if (n0 >= ppmu->n_counter) | 1408 | if (n0 >= ppmu->n_counter) |
1409 | goto out; | 1409 | goto out; |
@@ -1469,7 +1469,7 @@ static void power_pmu_del(struct perf_event *event, int ef_flags) | |||
1469 | 1469 | ||
1470 | power_pmu_read(event); | 1470 | power_pmu_read(event); |
1471 | 1471 | ||
1472 | cpuhw = &__get_cpu_var(cpu_hw_events); | 1472 | cpuhw = this_cpu_ptr(&cpu_hw_events); |
1473 | for (i = 0; i < cpuhw->n_events; ++i) { | 1473 | for (i = 0; i < cpuhw->n_events; ++i) { |
1474 | if (event == cpuhw->event[i]) { | 1474 | if (event == cpuhw->event[i]) { |
1475 | while (++i < cpuhw->n_events) { | 1475 | while (++i < cpuhw->n_events) { |
@@ -1575,7 +1575,7 @@ static void power_pmu_stop(struct perf_event *event, int ef_flags) | |||
1575 | */ | 1575 | */ |
1576 | static void power_pmu_start_txn(struct pmu *pmu) | 1576 | static void power_pmu_start_txn(struct pmu *pmu) |
1577 | { | 1577 | { |
1578 | struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); | 1578 | struct cpu_hw_events *cpuhw = this_cpu_ptr(&cpu_hw_events); |
1579 | 1579 | ||
1580 | perf_pmu_disable(pmu); | 1580 | perf_pmu_disable(pmu); |
1581 | cpuhw->group_flag |= PERF_EVENT_TXN; | 1581 | cpuhw->group_flag |= PERF_EVENT_TXN; |
@@ -1589,7 +1589,7 @@ static void power_pmu_start_txn(struct pmu *pmu) | |||
1589 | */ | 1589 | */ |
1590 | static void power_pmu_cancel_txn(struct pmu *pmu) | 1590 | static void power_pmu_cancel_txn(struct pmu *pmu) |
1591 | { | 1591 | { |
1592 | struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); | 1592 | struct cpu_hw_events *cpuhw = this_cpu_ptr(&cpu_hw_events); |
1593 | 1593 | ||
1594 | cpuhw->group_flag &= ~PERF_EVENT_TXN; | 1594 | cpuhw->group_flag &= ~PERF_EVENT_TXN; |
1595 | perf_pmu_enable(pmu); | 1595 | perf_pmu_enable(pmu); |
@@ -1607,7 +1607,7 @@ static int power_pmu_commit_txn(struct pmu *pmu) | |||
1607 | 1607 | ||
1608 | if (!ppmu) | 1608 | if (!ppmu) |
1609 | return -EAGAIN; | 1609 | return -EAGAIN; |
1610 | cpuhw = &__get_cpu_var(cpu_hw_events); | 1610 | cpuhw = this_cpu_ptr(&cpu_hw_events); |
1611 | n = cpuhw->n_events; | 1611 | n = cpuhw->n_events; |
1612 | if (check_excludes(cpuhw->event, cpuhw->flags, 0, n)) | 1612 | if (check_excludes(cpuhw->event, cpuhw->flags, 0, n)) |
1613 | return -EAGAIN; | 1613 | return -EAGAIN; |
@@ -1964,7 +1964,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val, | |||
1964 | 1964 | ||
1965 | if (event->attr.sample_type & PERF_SAMPLE_BRANCH_STACK) { | 1965 | if (event->attr.sample_type & PERF_SAMPLE_BRANCH_STACK) { |
1966 | struct cpu_hw_events *cpuhw; | 1966 | struct cpu_hw_events *cpuhw; |
1967 | cpuhw = &__get_cpu_var(cpu_hw_events); | 1967 | cpuhw = this_cpu_ptr(&cpu_hw_events); |
1968 | power_pmu_bhrb_read(cpuhw); | 1968 | power_pmu_bhrb_read(cpuhw); |
1969 | data.br_stack = &cpuhw->bhrb_stack; | 1969 | data.br_stack = &cpuhw->bhrb_stack; |
1970 | } | 1970 | } |
@@ -2037,7 +2037,7 @@ static bool pmc_overflow(unsigned long val) | |||
2037 | static void perf_event_interrupt(struct pt_regs *regs) | 2037 | static void perf_event_interrupt(struct pt_regs *regs) |
2038 | { | 2038 | { |
2039 | int i, j; | 2039 | int i, j; |
2040 | struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); | 2040 | struct cpu_hw_events *cpuhw = this_cpu_ptr(&cpu_hw_events); |
2041 | struct perf_event *event; | 2041 | struct perf_event *event; |
2042 | unsigned long val[8]; | 2042 | unsigned long val[8]; |
2043 | int found, active; | 2043 | int found, active; |