From: Peter Zijlstra <peterz@infradead.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: "Ingo Molnar" <mingo@elte.hu>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Robert Richter" <robert.richter@amd.com>,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
"Stephane Eranian" <eranian@google.com>
Subject: Re: [RFC] perf, x86: Segregate PMU workaraunds into x86_pmu_quirk_ops structure
Date: Sat, 29 May 2010 20:33:10 +0200 [thread overview]
Message-ID: <1275157990.1645.519.camel@laptop> (raw)
In-Reply-To: <20100529182409.GJ5322@lenovo>
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?
next prev parent reply other threads:[~2010-05-31 16:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-29 18:24 [RFC] perf, x86: Segregate PMU workaraunds into x86_pmu_quirk_ops structure Cyrill Gorcunov
2010-05-29 18:33 ` Peter Zijlstra [this message]
2010-05-31 16:45 ` Cyrill Gorcunov
2010-06-01 21:25 ` Cyrill Gorcunov
2010-05-31 13:00 ` Robert Richter
2010-05-31 13:43 ` Peter Zijlstra
2010-05-31 14:09 ` Cyrill Gorcunov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1275157990.1645.519.camel@laptop \
--to=peterz@infradead.org \
--cc=acme@redhat.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=gorcunov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=robert.richter@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.