|
@@ -2798,14 +2798,14 @@ static enum hrtimer_restart uncore_pmu_hrtimer(struct hrtimer *hrtimer)
|
|
|
|
|
|
local_irq_restore(flags);
|
|
|
|
|
|
- hrtimer_forward_now(hrtimer, ns_to_ktime(UNCORE_PMU_HRTIMER_INTERVAL));
|
|
|
+ hrtimer_forward_now(hrtimer, ns_to_ktime(box->hrtimer_duration));
|
|
|
return HRTIMER_RESTART;
|
|
|
}
|
|
|
|
|
|
static void uncore_pmu_start_hrtimer(struct intel_uncore_box *box)
|
|
|
{
|
|
|
__hrtimer_start_range_ns(&box->hrtimer,
|
|
|
- ns_to_ktime(UNCORE_PMU_HRTIMER_INTERVAL), 0,
|
|
|
+ ns_to_ktime(box->hrtimer_duration), 0,
|
|
|
HRTIMER_MODE_REL_PINNED, 0);
|
|
|
}
|
|
|
|
|
@@ -2839,6 +2839,9 @@ static struct intel_uncore_box *uncore_alloc_box(struct intel_uncore_type *type,
|
|
|
box->cpu = -1;
|
|
|
box->phys_id = -1;
|
|
|
|
|
|
+ /* set default hrtimer timeout */
|
|
|
+ box->hrtimer_duration = UNCORE_PMU_HRTIMER_INTERVAL;
|
|
|
+
|
|
|
return box;
|
|
|
}
|
|
|
|