aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_counter.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/perf_counter.c')
-rw-r--r--kernel/perf_counter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 8d6ecfa64c0e..d6cc22271ef4 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -1571,9 +1571,9 @@ static int cpu_clock_perf_counter_enable(struct perf_counter *counter)
1571 int cpu = raw_smp_processor_id(); 1571 int cpu = raw_smp_processor_id();
1572 1572
1573 atomic64_set(&hwc->prev_count, cpu_clock(cpu)); 1573 atomic64_set(&hwc->prev_count, cpu_clock(cpu));
1574 hrtimer_init(&hwc->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
1575 hwc->hrtimer.function = perf_swcounter_hrtimer;
1574 if (hwc->irq_period) { 1576 if (hwc->irq_period) {
1575 hrtimer_init(&hwc->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
1576 hwc->hrtimer.function = perf_swcounter_hrtimer;
1577 __hrtimer_start_range_ns(&hwc->hrtimer, 1577 __hrtimer_start_range_ns(&hwc->hrtimer,
1578 ns_to_ktime(hwc->irq_period), 0, 1578 ns_to_ktime(hwc->irq_period), 0,
1579 HRTIMER_MODE_REL, 0); 1579 HRTIMER_MODE_REL, 0);
@@ -1635,9 +1635,9 @@ static int task_clock_perf_counter_enable(struct perf_counter *counter)
1635 struct hw_perf_counter *hwc = &counter->hw; 1635 struct hw_perf_counter *hwc = &counter->hw;
1636 1636
1637 atomic64_set(&hwc->prev_count, task_clock_perf_counter_val(counter, 0)); 1637 atomic64_set(&hwc->prev_count, task_clock_perf_counter_val(counter, 0));
1638 hrtimer_init(&hwc->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
1639 hwc->hrtimer.function = perf_swcounter_hrtimer;
1638 if (hwc->irq_period) { 1640 if (hwc->irq_period) {
1639 hrtimer_init(&hwc->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
1640 hwc->hrtimer.function = perf_swcounter_hrtimer;
1641 __hrtimer_start_range_ns(&hwc->hrtimer, 1641 __hrtimer_start_range_ns(&hwc->hrtimer,
1642 ns_to_ktime(hwc->irq_period), 0, 1642 ns_to_ktime(hwc->irq_period), 0,
1643 HRTIMER_MODE_REL, 0); 1643 HRTIMER_MODE_REL, 0);