Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1303335
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Stephane Eranian <eranian@google.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] perf/x86: add Intel SkyLake uncore IMC PMU support |
| Date | Thu, 07 Jan 2016 08:30:02 +0100 |
| Message-ID | <qOdbc-4Ps-1@gated-at.bofh.it> (permalink) |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=j7wgaccu3cDa9KP/c2PMp97Vw5SgqU2TO8xFze6gy0Q=; b=M1DQk7U0AHykRzpZ0KBANSZE7TWzXvW4tDRW9xVT6sGNDKzZAcyJDJ39IqesVVgM53 5ErHQ5zPe39PeYIQovrj5sDywyfNcAFzjEzxoP6z+H2xJbpf6mIFZGxIaw0xw0jS7N9G YPTqHI4hKUfwtxgpXqq+xWwWcLllpI9OceeMtEfGXwe+v4Z/gUf2zO3xGzgsLYp/X/CV iCwjFrGGoMzAp6dkITyEZkpixQdXcTc/UxzvwqIS6XmzZTkyyl7JDTYRrPrMHo4lx0LY FT6KoXY+vuh6nPbmwnk+p6k0DaoOKBgec1MmXbsQP3GPefOm2tbfM7ImA8Tx7YwitZ0f fLHw== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=j7wgaccu3cDa9KP/c2PMp97Vw5SgqU2TO8xFze6gy0Q=; b=WNx9uRJrrkaMNuqt/4zDfYl18Vz34owFgLHZ0ZH6RSNb/75ayzOrQ/gWdD0yaP+Mba Q2q2ThPhi6Q4FOeysgpZf6SOnm5EIrWpVqO/6gE+7nAleKT62l7uuL3utN4AfC1Y2X+H 9W6Ms/CnkOyVoV6ccUI+WXkGm1BzHDX12vxTf36sAT2LPjyp/kGQ5O4Y8Bnqgi4cEboW jVsvrPCqGY5TfyvyK13YeCO5qgr5tz/HVWunRBBbifExaA4lgqKqDExWX9jGaowadHfx 7FpxYTziiFZ9hLKvJ4fPN4/TUEiQQ2XMyh3jNlW2NVVbopUFinrjUC7ejIRm751V+baf AlJw== |
| X-Gm-Message-State | ALoCoQm7zf8j47JStj2t6s2FMTTyWsIEKeEbrEESiQ4YFBD9RvGwL5ipE9UdfDSVD/GTwa/iUgoc1lUIv/kIBFt61b4hYJURdQ== |
| X-Received | by 10.66.252.102 with SMTP id zr6mr63138327pac.66.1452151571305; Wed, 06 Jan 2016 23:26:11 -0800 (PST) |
| X-Mailer | git-send-email 1.9.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 107 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | acme@redhat.com, peterz@infradead.org, mingo@elte.hu, ak@linux.intel.com, kan.liang@intel.com |
| X-Original-Date | Thu, 7 Jan 2016 08:25:46 +0100 |
| X-Original-Message-ID | <1452151546-8853-1-git-send-email-eranian@google.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1303335 |
Show key headers only | View raw
This patch enables the uncore_imc PMU for Intel
SkyLake Desktop processors (Core i7-6700, model 94).
It is possible to compute memory read/write bandwidth
using:
$ perf stat -a -e uncore_imc/data_reads/,uncore_imc/data_writes/ ....
Signed-off-by: Stephane Eranian <eranian@google.com>
---
arch/x86/kernel/cpu/perf_event_intel_uncore.c | 3 +++
arch/x86/kernel/cpu/perf_event_intel_uncore.h | 1 +
arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c | 20 ++++++++++++++++++++
3 files changed, 24 insertions(+)
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index f97f807..3bf41d4 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -995,6 +995,9 @@ static int __init uncore_pci_init(void)
case 87: /* Knights Landing */
ret = knl_uncore_pci_init();
break;
+ case 94: /* SkyLake */
+ ret = skl_uncore_pci_init();
+ break;
default:
return 0;
}
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.h b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
index 07aa2d6..a7086b8 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.h
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
@@ -336,6 +336,7 @@ int snb_uncore_pci_init(void);
int ivb_uncore_pci_init(void);
int hsw_uncore_pci_init(void);
int bdw_uncore_pci_init(void);
+int skl_uncore_pci_init(void);
void snb_uncore_cpu_init(void);
void nhm_uncore_cpu_init(void);
int snb_pci2phy_map_init(int devid);
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c b/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c
index 0b93482..2bd030d 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c
@@ -8,6 +8,7 @@
#define PCI_DEVICE_ID_INTEL_HSW_IMC 0x0c00
#define PCI_DEVICE_ID_INTEL_HSW_U_IMC 0x0a04
#define PCI_DEVICE_ID_INTEL_BDW_IMC 0x1604
+#define PCI_DEVICE_ID_INTEL_SKL_IMC 0x191f
/* SNB event control */
#define SNB_UNC_CTL_EV_SEL_MASK 0x000000ff
@@ -524,6 +525,14 @@ static const struct pci_device_id bdw_uncore_pci_ids[] = {
{ /* end: all zeroes */ },
};
+static const struct pci_device_id skl_uncore_pci_ids[] = {
+ { /* IMC */
+ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SKL_IMC),
+ .driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
+ },
+ { /* end: all zeroes */ },
+};
+
static struct pci_driver snb_uncore_pci_driver = {
.name = "snb_uncore",
.id_table = snb_uncore_pci_ids,
@@ -544,6 +553,11 @@ static struct pci_driver bdw_uncore_pci_driver = {
.id_table = bdw_uncore_pci_ids,
};
+static struct pci_driver skl_uncore_pci_driver = {
+ .name = "skl_uncore",
+ .id_table = skl_uncore_pci_ids,
+};
+
struct imc_uncore_pci_dev {
__u32 pci_id;
struct pci_driver *driver;
@@ -558,6 +572,7 @@ static const struct imc_uncore_pci_dev desktop_imc_pci_ids[] = {
IMC_DEV(HSW_IMC, &hsw_uncore_pci_driver), /* 4th Gen Core Processor */
IMC_DEV(HSW_U_IMC, &hsw_uncore_pci_driver), /* 4th Gen Core ULT Mobile Processor */
IMC_DEV(BDW_IMC, &bdw_uncore_pci_driver), /* 5th Gen Core U */
+ IMC_DEV(SKL_IMC, &skl_uncore_pci_driver), /* 6th Gen Core */
{ /* end marker */ }
};
@@ -610,6 +625,11 @@ int bdw_uncore_pci_init(void)
return imc_uncore_pci_init();
}
+int skl_uncore_pci_init(void)
+{
+ return imc_uncore_pci_init();
+}
+
/* end of Sandy Bridge uncore support */
/* Nehalem uncore support */
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] perf/x86: add Intel SkyLake uncore IMC PMU support Stephane Eranian <eranian@google.com> - 2016-01-07 08:30 +0100
Re: [PATCH] perf/x86: add Intel SkyLake uncore IMC PMU support Andi Kleen <ak@linux.intel.com> - 2016-01-07 18:00 +0100
Re: [PATCH] perf/x86: add Intel SkyLake uncore IMC PMU support Stephane Eranian <eranian@google.com> - 2016-01-07 19:40 +0100
csiph-web