diff options
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_uncore.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_uncore.h | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index e6f32b36c9be..ea823b8fd592 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c | |||
@@ -2798,14 +2798,14 @@ static enum hrtimer_restart uncore_pmu_hrtimer(struct hrtimer *hrtimer) | |||
2798 | 2798 | ||
2799 | local_irq_restore(flags); | 2799 | local_irq_restore(flags); |
2800 | 2800 | ||
2801 | hrtimer_forward_now(hrtimer, ns_to_ktime(UNCORE_PMU_HRTIMER_INTERVAL)); | 2801 | hrtimer_forward_now(hrtimer, ns_to_ktime(box->hrtimer_duration)); |
2802 | return HRTIMER_RESTART; | 2802 | return HRTIMER_RESTART; |
2803 | } | 2803 | } |
2804 | 2804 | ||
2805 | static void uncore_pmu_start_hrtimer(struct intel_uncore_box *box) | 2805 | static void uncore_pmu_start_hrtimer(struct intel_uncore_box *box) |
2806 | { | 2806 | { |
2807 | __hrtimer_start_range_ns(&box->hrtimer, | 2807 | __hrtimer_start_range_ns(&box->hrtimer, |
2808 | ns_to_ktime(UNCORE_PMU_HRTIMER_INTERVAL), 0, | 2808 | ns_to_ktime(box->hrtimer_duration), 0, |
2809 | HRTIMER_MODE_REL_PINNED, 0); | 2809 | HRTIMER_MODE_REL_PINNED, 0); |
2810 | } | 2810 | } |
2811 | 2811 | ||
@@ -2839,6 +2839,9 @@ static struct intel_uncore_box *uncore_alloc_box(struct intel_uncore_type *type, | |||
2839 | box->cpu = -1; | 2839 | box->cpu = -1; |
2840 | box->phys_id = -1; | 2840 | box->phys_id = -1; |
2841 | 2841 | ||
2842 | /* set default hrtimer timeout */ | ||
2843 | box->hrtimer_duration = UNCORE_PMU_HRTIMER_INTERVAL; | ||
2844 | |||
2842 | return box; | 2845 | return box; |
2843 | } | 2846 | } |
2844 | 2847 | ||
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.h b/arch/x86/kernel/cpu/perf_event_intel_uncore.h index 77dc9a575fd9..7efd298f6c6b 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.h +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.h | |||
@@ -489,6 +489,7 @@ struct intel_uncore_box { | |||
489 | u64 tags[UNCORE_PMC_IDX_MAX]; | 489 | u64 tags[UNCORE_PMC_IDX_MAX]; |
490 | struct pci_dev *pci_dev; | 490 | struct pci_dev *pci_dev; |
491 | struct intel_uncore_pmu *pmu; | 491 | struct intel_uncore_pmu *pmu; |
492 | u64 hrtimer_duration; /* hrtimer timeout for this box */ | ||
492 | struct hrtimer hrtimer; | 493 | struct hrtimer hrtimer; |
493 | struct list_head list; | 494 | struct list_head list; |
494 | struct intel_uncore_extra_reg shared_regs[0]; | 495 | struct intel_uncore_extra_reg shared_regs[0]; |