aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/perf_counter.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/perf_counter.c')
-rw-r--r--arch/powerpc/kernel/perf_counter.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c
index df007fe0cc0b..cde720fc495c 100644
--- a/arch/powerpc/kernel/perf_counter.c
+++ b/arch/powerpc/kernel/perf_counter.c
@@ -650,24 +650,6 @@ hw_perf_counter_init(struct perf_counter *counter)
650} 650}
651 651
652/* 652/*
653 * Handle wakeups.
654 */
655void perf_counter_do_pending(void)
656{
657 int i;
658 struct cpu_hw_counters *cpuhw = &__get_cpu_var(cpu_hw_counters);
659 struct perf_counter *counter;
660
661 for (i = 0; i < cpuhw->n_counters; ++i) {
662 counter = cpuhw->counter[i];
663 if (counter && counter->wakeup_pending) {
664 counter->wakeup_pending = 0;
665 wake_up(&counter->waitq);
666 }
667 }
668}
669
670/*
671 * A counter has overflowed; update its count and record 653 * A counter has overflowed; update its count and record
672 * things if requested. Note that interrupts are hard-disabled 654 * things if requested. Note that interrupts are hard-disabled
673 * here so there is no possibility of being interrupted. 655 * here so there is no possibility of being interrupted.
@@ -720,7 +702,7 @@ static void perf_counter_interrupt(struct pt_regs *regs)
720 struct cpu_hw_counters *cpuhw = &__get_cpu_var(cpu_hw_counters); 702 struct cpu_hw_counters *cpuhw = &__get_cpu_var(cpu_hw_counters);
721 struct perf_counter *counter; 703 struct perf_counter *counter;
722 long val; 704 long val;
723 int need_wakeup = 0, found = 0; 705 int found = 0;
724 706
725 for (i = 0; i < cpuhw->n_counters; ++i) { 707 for (i = 0; i < cpuhw->n_counters; ++i) {
726 counter = cpuhw->counter[i]; 708 counter = cpuhw->counter[i];
@@ -761,7 +743,7 @@ static void perf_counter_interrupt(struct pt_regs *regs)
761 * immediately; otherwise we'll have do the wakeup when interrupts 743 * immediately; otherwise we'll have do the wakeup when interrupts
762 * get soft-enabled. 744 * get soft-enabled.
763 */ 745 */
764 if (get_perf_counter_pending() && regs->softe) { 746 if (test_perf_counter_pending() && regs->softe) {
765 irq_enter(); 747 irq_enter();
766 clear_perf_counter_pending(); 748 clear_perf_counter_pending();
767 perf_counter_do_pending(); 749 perf_counter_do_pending();