diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/perf_callchain.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/perf_event.c | 10 |
2 files changed, 5 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/perf_callchain.c b/arch/powerpc/kernel/perf_callchain.c index a3c11cac3d71..95ad9dad298e 100644 --- a/arch/powerpc/kernel/perf_callchain.c +++ b/arch/powerpc/kernel/perf_callchain.c | |||
@@ -495,9 +495,6 @@ struct perf_callchain_entry *perf_callchain(struct pt_regs *regs) | |||
495 | 495 | ||
496 | entry->nr = 0; | 496 | entry->nr = 0; |
497 | 497 | ||
498 | if (current->pid == 0) /* idle task? */ | ||
499 | return entry; | ||
500 | |||
501 | if (!user_mode(regs)) { | 498 | if (!user_mode(regs)) { |
502 | perf_callchain_kernel(regs, entry); | 499 | perf_callchain_kernel(regs, entry); |
503 | if (current->mm) | 500 | if (current->mm) |
diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c index 1eb85fbf53a5..b6cf8f1f4d35 100644 --- a/arch/powerpc/kernel/perf_event.c +++ b/arch/powerpc/kernel/perf_event.c | |||
@@ -718,10 +718,10 @@ static int collect_events(struct perf_event *group, int max_count, | |||
718 | return n; | 718 | return n; |
719 | } | 719 | } |
720 | 720 | ||
721 | static void event_sched_in(struct perf_event *event, int cpu) | 721 | static void event_sched_in(struct perf_event *event) |
722 | { | 722 | { |
723 | event->state = PERF_EVENT_STATE_ACTIVE; | 723 | event->state = PERF_EVENT_STATE_ACTIVE; |
724 | event->oncpu = cpu; | 724 | event->oncpu = smp_processor_id(); |
725 | event->tstamp_running += event->ctx->time - event->tstamp_stopped; | 725 | event->tstamp_running += event->ctx->time - event->tstamp_stopped; |
726 | if (is_software_event(event)) | 726 | if (is_software_event(event)) |
727 | event->pmu->enable(event); | 727 | event->pmu->enable(event); |
@@ -735,7 +735,7 @@ static void event_sched_in(struct perf_event *event, int cpu) | |||
735 | */ | 735 | */ |
736 | int hw_perf_group_sched_in(struct perf_event *group_leader, | 736 | int hw_perf_group_sched_in(struct perf_event *group_leader, |
737 | struct perf_cpu_context *cpuctx, | 737 | struct perf_cpu_context *cpuctx, |
738 | struct perf_event_context *ctx, int cpu) | 738 | struct perf_event_context *ctx) |
739 | { | 739 | { |
740 | struct cpu_hw_events *cpuhw; | 740 | struct cpu_hw_events *cpuhw; |
741 | long i, n, n0; | 741 | long i, n, n0; |
@@ -766,10 +766,10 @@ int hw_perf_group_sched_in(struct perf_event *group_leader, | |||
766 | cpuhw->event[i]->hw.config = cpuhw->events[i]; | 766 | cpuhw->event[i]->hw.config = cpuhw->events[i]; |
767 | cpuctx->active_oncpu += n; | 767 | cpuctx->active_oncpu += n; |
768 | n = 1; | 768 | n = 1; |
769 | event_sched_in(group_leader, cpu); | 769 | event_sched_in(group_leader); |
770 | list_for_each_entry(sub, &group_leader->sibling_list, group_entry) { | 770 | list_for_each_entry(sub, &group_leader->sibling_list, group_entry) { |
771 | if (sub->state != PERF_EVENT_STATE_OFF) { | 771 | if (sub->state != PERF_EVENT_STATE_OFF) { |
772 | event_sched_in(sub, cpu); | 772 | event_sched_in(sub); |
773 | ++n; | 773 | ++n; |
774 | } | 774 | } |
775 | } | 775 | } |