Message ID | 159980774821.20229.7720841504258329146.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers | show |
Series | [tip:,perf/core] perf/x86/amd: Fix sampling Large Increment per Cycle events | expand |
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index 0f3d015..cb5cfef 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