lkml.org 
[lkml]   [2010]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] perf, x86: Segregate PMU workaraunds into x86_pmu_quirk_ops structure
From
Date

On Sat, 2010-05-29 at 22:24 +0400, Cyrill Gorcunov wrote:
> @@ -924,7 +930,11 @@ x86_perf_event_set_period(struct perf_ev
> */
> atomic64_set(&hwc->prev_count, (u64)-left);
>
> - wrmsrl(hwc->event_base + idx,
> + if (x86_pmu.quirks.perfctr_write)
> + x86_pmu.quirks.perfctr_write(hwc->event_base + idx,
> + (u64)(-left) & x86_pmu.cntval_mask);
> + else
> + wrmsrl(hwc->event_base + idx,
> (u64)(-left) & x86_pmu.cntval_mask);

This bit is rather ugly,.. not quite sure how to clean it up though.
Anybody got a bright idea?



\
 
 \ /
  Last update: 2010-05-31 18:37    [W:0.104 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site