From: tip-bot for Stephane Eranian <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: torvalds@linux-foundation.org,
alexander.shishkin@linux.intel.com, peterz@infradead.org,
vincent.weaver@maine.edu, eranian@google.com,
kan.liang@intel.com, mingo@kernel.org, hpa@zytor.com,
tglx@linutronix.de, jolsa@redhat.com, acme@redhat.com,
linux-kernel@vger.kernel.org
Subject: [tip:perf/core] perf/x86/intel/uncore: Handle non-standard counter offset
Date: Mon, 5 Sep 2016 04:52:42 -0700 [thread overview]
Message-ID: <tip-24cf84672e0a1e0d13f3894b60cd820a0140342a@git.kernel.org> (raw)
In-Reply-To: <1471378190-17276-2-git-send-email-kan.liang@intel.com>
Commit-ID: 24cf84672e0a1e0d13f3894b60cd820a0140342a
Gitweb: http://git.kernel.org/tip/24cf84672e0a1e0d13f3894b60cd820a0140342a
Author: Stephane Eranian <eranian@google.com>
AuthorDate: Tue, 16 Aug 2016 16:09:49 -0400
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 5 Sep 2016 13:15:08 +0200
perf/x86/intel/uncore: Handle non-standard counter offset
The offset of the counters for UPI and M2M boxes on Skylake server is
non-standard (8 bytes apart).
This patch introduces a custom flag UNCORE_BOX_FLAG_CTL_OFFS8 to
specially handle it.
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Kan Liang <kan.liang@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1471378190-17276-2-git-send-email-kan.liang@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/events/intel/uncore.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/events/intel/uncore.h b/arch/x86/events/intel/uncore.h
index 78b9c23..a43175f 100644
--- a/arch/x86/events/intel/uncore.h
+++ b/arch/x86/events/intel/uncore.h
@@ -120,6 +120,7 @@ struct intel_uncore_box {
};
#define UNCORE_BOX_FLAG_INITIATED 0
+#define UNCORE_BOX_FLAG_CTL_OFFS8 1 /* event config registers are 8-byte apart */
struct uncore_event_desc {
struct kobj_attribute attr;
@@ -172,6 +173,9 @@ static inline unsigned uncore_pci_fixed_ctr(struct intel_uncore_box *box)
static inline
unsigned uncore_pci_event_ctl(struct intel_uncore_box *box, int idx)
{
+ if (test_bit(UNCORE_BOX_FLAG_CTL_OFFS8, &box->flags))
+ return idx * 8 + box->pmu->type->event_ctl;
+
return idx * 4 + box->pmu->type->event_ctl;
}
next prev parent reply other threads:[~2016-09-05 11:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 20:09 [PATCH V2 1/3] perf/x86/intel/uncore: remove hard code for Node ID mapping location Kan Liang
2016-08-16 20:09 ` [PATCH V2 2/3] perf/x86/intel/uncore: handle non-standard counter offset Kan Liang
2016-09-05 11:52 ` tip-bot for Stephane Eranian [this message]
2016-08-16 20:09 ` [PATCH V2 3/3] perf/x86/intel/uncore: Add Skylake server uncore support Kan Liang
2016-09-10 12:42 ` [tip:perf/core] " tip-bot for Kan Liang
2016-09-05 11:52 ` [tip:perf/core] perf/x86/intel/uncore: Remove hard-coded implementation for Node ID mapping location tip-bot for Kan Liang
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=tip-24cf84672e0a1e0d13f3894b60cd820a0140342a@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vincent.weaver@maine.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox