mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yunying Sun <yunying.sun@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <ak@linux.intel.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	linux-kernel@vger.kernel.org, vince@deater.net,
	eranian@google.com, Arnaldo Carvalho de Melo <acme@infradead.org>,
	Yunying Sun <yunying.sun@intel.com>
Subject: [PATCH] perf/x86/intel: Add hardware cache event support for Intel Gemini Lake
Date: Thu, 13 Apr 2017 16:19:13 +0800	[thread overview]
Message-ID: <20170413081913.17338-1-yunying.sun@intel.com> (raw)

Gemini Lake is a Goldmont core based Apollo Lake successor with better
CPU performance. Currently there is no hardware cache events available
if checking with "perf list cache" on Gemini Lake. Perf hardware cache
event test always fail because of this.

This patch adds INTEL_FAM6_ATOM_GEMINI_LAKE case to use same Goldmont
hardware cache events table for Gemini Lake. With this patch, below
hardware cache events are available on Gemini Lake, and perf hardware
cache event test can pass.

L1-dcache-loads
L1-dcache-stores
L1-icache-load-misses
L1-icache-loads
LLC-load-misses
LLC-loads
LLC-prefetch-misses
LLC-prefetches
LLC-store-misses
LLC-stores
branch-load-misses
branch-loads
dTLB-loads
dTLB-stores
iTLB-load-misses
iTLB-loads

Signed-off-by: Yunying Sun <yunying.sun@intel.com>
Tested-by: Yunying Sun <yunying.sun@intel.com>
---
 arch/x86/events/intel/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index eb1484c..f80c3a3 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -3731,6 +3731,7 @@ __init int intel_pmu_init(void)
 
 	case INTEL_FAM6_ATOM_GOLDMONT:
 	case INTEL_FAM6_ATOM_DENVERTON:
+	case INTEL_FAM6_ATOM_GEMINI_LAKE:
 		memcpy(hw_cache_event_ids, glm_hw_cache_event_ids,
 		       sizeof(hw_cache_event_ids));
 		memcpy(hw_cache_extra_regs, glm_hw_cache_extra_regs,
-- 
2.9.3

             reply	other threads:[~2017-04-13  8:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-13  8:19 Yunying Sun [this message]
2017-04-13 13:45 ` Andi Kleen

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=20170413081913.17338-1-yunying.sun@intel.com \
    --to=yunying.sun@intel.com \
    --cc=acme@infradead.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=vince@deater.net \
    /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

all inboxes | Powered by JetHome®