From d73bd83a921c0740088a73eb30ecc3835539576b Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Wed, 20 May 2009 12:21:21 +0200 Subject: [PATCH] --- yaml --- r: 147479 b: refs/heads/master c: b986d7ec0f8b7ea3cc7366d80a137fbe839df227 h: refs/heads/master i: 147477: 0b9c7ae390c9ff5c89cc83865a1ede1db7ef16e3 147475: f835224b306eff3ede9bcf156939dba2dc8e9d98 147471: 8a612005bac63b448426f15ca5ecb9988c7e3423 v: v3 --- [refs] | 2 +- trunk/kernel/perf_counter.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 2b0d3a1c0075..038ed7620608 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 26b119bc811a73bac6ecf95bdf284bf31c7955f0 +refs/heads/master: b986d7ec0f8b7ea3cc7366d80a137fbe839df227 diff --git a/trunk/kernel/perf_counter.c b/trunk/kernel/perf_counter.c index db02eb16c777..473ed2cafbfc 100644 --- a/trunk/kernel/perf_counter.c +++ b/trunk/kernel/perf_counter.c @@ -2716,7 +2716,8 @@ static int cpu_clock_perf_counter_enable(struct perf_counter *counter) static void cpu_clock_perf_counter_disable(struct perf_counter *counter) { - hrtimer_cancel(&counter->hw.hrtimer); + if (counter->hw.irq_period) + hrtimer_cancel(&counter->hw.hrtimer); cpu_clock_perf_counter_update(counter); } @@ -2767,7 +2768,8 @@ static int task_clock_perf_counter_enable(struct perf_counter *counter) static void task_clock_perf_counter_disable(struct perf_counter *counter) { - hrtimer_cancel(&counter->hw.hrtimer); + if (counter->hw.irq_period) + hrtimer_cancel(&counter->hw.hrtimer); task_clock_perf_counter_update(counter, counter->ctx->time); }