aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/cpu/perf_counter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index 886dcf334bc3..5bfd30ab3920 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -286,6 +286,9 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
286 hwc->nmi = 1; 286 hwc->nmi = 1;
287 } 287 }
288 288
289 if (!hwc->irq_period)
290 hwc->irq_period = x86_pmu.max_period;
291
289 atomic64_set(&hwc->period_left, 292 atomic64_set(&hwc->period_left,
290 min(x86_pmu.max_period, hwc->irq_period)); 293 min(x86_pmu.max_period, hwc->irq_period));
291 294