Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287673
b: refs/heads/master
c: 9a45a94
h: refs/heads/master
i:
  287671: 1b548ec
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Feb 16, 2012
1 parent c005fb3 commit fc76293
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64f8c13561fbd2f1a8b4a8975b2aee73b561093e
refs/heads/master: 9a45a9407c69d068500923480884661e2b9cc421
8 changes: 7 additions & 1 deletion trunk/arch/powerpc/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,7 @@ static void power_pmu_start(struct perf_event *event, int ef_flags)
{
unsigned long flags;
s64 left;
unsigned long val;

if (!event->hw.idx || !event->hw.sample_period)
return;
Expand All @@ -880,7 +881,12 @@ static void power_pmu_start(struct perf_event *event, int ef_flags)

event->hw.state = 0;
left = local64_read(&event->hw.period_left);
write_pmc(event->hw.idx, left);

val = 0;
if (left < 0x80000000L)
val = 0x80000000L - left;

write_pmc(event->hw.idx, val);

perf_event_update_userpage(event);
perf_pmu_enable(event->pmu);
Expand Down

0 comments on commit fc76293

Please sign in to comment.