diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index 0f3d01562ded..cb5cfef3a938 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c @@ -1326,11 +1326,11 @@ int x86_perf_event_set_period(struct perf_event *event) wrmsrl(hwc->event_base, (u64)(-left) & x86_pmu.cntval_mask); /* - * Clear the Merge event counter's upper 16 bits since + * Sign extend the Merge event counter's upper 16 bits since * we currently declare a 48-bit counter width */ if (is_counter_pair(hwc)) - wrmsrl(x86_pmu_event_addr(idx + 1), 0); + wrmsrl(x86_pmu_event_addr(idx + 1), 0xffff); /* * Due to erratum on certan cpu we need