diff options
Diffstat (limited to 'arch/powerpc/kernel/perf_counter.c')
-rw-r--r-- | arch/powerpc/kernel/perf_counter.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c index 70e1f57f7dd8..ccd6b2135642 100644 --- a/arch/powerpc/kernel/perf_counter.c +++ b/arch/powerpc/kernel/perf_counter.c | |||
@@ -62,7 +62,6 @@ static inline unsigned long perf_ip_adjust(struct pt_regs *regs) | |||
62 | { | 62 | { |
63 | return 0; | 63 | return 0; |
64 | } | 64 | } |
65 | static inline void perf_set_pmu_inuse(int inuse) { } | ||
66 | static inline void perf_get_data_addr(struct pt_regs *regs, u64 *addrp) { } | 65 | static inline void perf_get_data_addr(struct pt_regs *regs, u64 *addrp) { } |
67 | static inline u32 perf_get_misc_flags(struct pt_regs *regs) | 66 | static inline u32 perf_get_misc_flags(struct pt_regs *regs) |
68 | { | 67 | { |
@@ -93,11 +92,6 @@ static inline unsigned long perf_ip_adjust(struct pt_regs *regs) | |||
93 | return 0; | 92 | return 0; |
94 | } | 93 | } |
95 | 94 | ||
96 | static inline void perf_set_pmu_inuse(int inuse) | ||
97 | { | ||
98 | get_lppaca()->pmcregs_in_use = inuse; | ||
99 | } | ||
100 | |||
101 | /* | 95 | /* |
102 | * The user wants a data address recorded. | 96 | * The user wants a data address recorded. |
103 | * If we're not doing instruction sampling, give them the SDAR | 97 | * If we're not doing instruction sampling, give them the SDAR |
@@ -531,8 +525,7 @@ void hw_perf_disable(void) | |||
531 | * Check if we ever enabled the PMU on this cpu. | 525 | * Check if we ever enabled the PMU on this cpu. |
532 | */ | 526 | */ |
533 | if (!cpuhw->pmcs_enabled) { | 527 | if (!cpuhw->pmcs_enabled) { |
534 | if (ppc_md.enable_pmcs) | 528 | ppc_enable_pmcs(); |
535 | ppc_md.enable_pmcs(); | ||
536 | cpuhw->pmcs_enabled = 1; | 529 | cpuhw->pmcs_enabled = 1; |
537 | } | 530 | } |
538 | 531 | ||
@@ -594,7 +587,7 @@ void hw_perf_enable(void) | |||
594 | mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE); | 587 | mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE); |
595 | mtspr(SPRN_MMCR1, cpuhw->mmcr[1]); | 588 | mtspr(SPRN_MMCR1, cpuhw->mmcr[1]); |
596 | if (cpuhw->n_counters == 0) | 589 | if (cpuhw->n_counters == 0) |
597 | perf_set_pmu_inuse(0); | 590 | ppc_set_pmu_inuse(0); |
598 | goto out_enable; | 591 | goto out_enable; |
599 | } | 592 | } |
600 | 593 | ||
@@ -627,7 +620,7 @@ void hw_perf_enable(void) | |||
627 | * bit set and set the hardware counters to their initial values. | 620 | * bit set and set the hardware counters to their initial values. |
628 | * Then unfreeze the counters. | 621 | * Then unfreeze the counters. |
629 | */ | 622 | */ |
630 | perf_set_pmu_inuse(1); | 623 | ppc_set_pmu_inuse(1); |
631 | mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE); | 624 | mtspr(SPRN_MMCRA, cpuhw->mmcr[2] & ~MMCRA_SAMPLE_ENABLE); |
632 | mtspr(SPRN_MMCR1, cpuhw->mmcr[1]); | 625 | mtspr(SPRN_MMCR1, cpuhw->mmcr[1]); |
633 | mtspr(SPRN_MMCR0, (cpuhw->mmcr[0] & ~(MMCR0_PMC1CE | MMCR0_PMCjCE)) | 626 | mtspr(SPRN_MMCR0, (cpuhw->mmcr[0] & ~(MMCR0_PMC1CE | MMCR0_PMCjCE)) |