aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2012-06-27 03:09:12 -0400
committerIngo Molnar <mingo@kernel.org>2012-07-05 15:55:58 -0400
commiteca26c9950f4d3e9c92ba275e9f4aee834aa1913 (patch)
tree29a3b12e548f570fae123fe7211959d8825e1335 /arch/x86/kernel
parent3e0091e2b6f8cd59e567f247e345a3a6ad1f6e7e (diff)
perf/x86: Use 0xff as pseudo code for fixed uncore event
Stephane Eranian suggestted using 0xff as pseudo code for fixed uncore event and using the umask value to determine which of the fixed events we want to map to. So far there is at most one fixed counter in a uncore PMU. So just change the definition of UNCORE_FIXED_EVENT to 0xff. Suggested-by: Stephane Eranian <eranian@google.com> Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1340780953-21130-1-git-send-email-zheng.z.yan@intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_uncore.c4
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_uncore.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index 6f43f9584e3..c42a3f7b523 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -179,7 +179,7 @@ static struct attribute *snbep_uncore_pcu_formats_attr[] = {
179}; 179};
180 180
181static struct uncore_event_desc snbep_uncore_imc_events[] = { 181static struct uncore_event_desc snbep_uncore_imc_events[] = {
182 INTEL_UNCORE_EVENT_DESC(clockticks, "event=0xff,umask=0xff"), 182 INTEL_UNCORE_EVENT_DESC(clockticks, "event=0xff,umask=0x00"),
183 INTEL_UNCORE_EVENT_DESC(cas_count_read, "event=0x04,umask=0x03"), 183 INTEL_UNCORE_EVENT_DESC(cas_count_read, "event=0x04,umask=0x03"),
184 INTEL_UNCORE_EVENT_DESC(cas_count_write, "event=0x04,umask=0x0c"), 184 INTEL_UNCORE_EVENT_DESC(cas_count_write, "event=0x04,umask=0x0c"),
185 { /* end: all zeroes */ }, 185 { /* end: all zeroes */ },
@@ -616,7 +616,7 @@ static struct attribute_group nhm_uncore_format_group = {
616}; 616};
617 617
618static struct uncore_event_desc nhm_uncore_events[] = { 618static struct uncore_event_desc nhm_uncore_events[] = {
619 INTEL_UNCORE_EVENT_DESC(clockticks, "event=0xff,umask=0xff"), 619 INTEL_UNCORE_EVENT_DESC(clockticks, "event=0xff,umask=0x00"),
620 INTEL_UNCORE_EVENT_DESC(qmc_writes_full_any, "event=0x2f,umask=0x0f"), 620 INTEL_UNCORE_EVENT_DESC(qmc_writes_full_any, "event=0x2f,umask=0x0f"),
621 INTEL_UNCORE_EVENT_DESC(qmc_normal_reads_any, "event=0x2c,umask=0x0f"), 621 INTEL_UNCORE_EVENT_DESC(qmc_normal_reads_any, "event=0x2c,umask=0x0f"),
622 INTEL_UNCORE_EVENT_DESC(qhl_request_ioh_reads, "event=0x20,umask=0x01"), 622 INTEL_UNCORE_EVENT_DESC(qhl_request_ioh_reads, "event=0x20,umask=0x01"),
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.h b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
index 4d52db0d1df..88498c7b342 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.h
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
@@ -9,7 +9,7 @@
9 9
10#define UNCORE_PMU_HRTIMER_INTERVAL (60 * NSEC_PER_SEC) 10#define UNCORE_PMU_HRTIMER_INTERVAL (60 * NSEC_PER_SEC)
11 11
12#define UNCORE_FIXED_EVENT 0xffff 12#define UNCORE_FIXED_EVENT 0xff
13#define UNCORE_PMC_IDX_MAX_GENERIC 8 13#define UNCORE_PMC_IDX_MAX_GENERIC 8
14#define UNCORE_PMC_IDX_FIXED UNCORE_PMC_IDX_MAX_GENERIC 14#define UNCORE_PMC_IDX_FIXED UNCORE_PMC_IDX_MAX_GENERIC
15#define UNCORE_PMC_IDX_MAX (UNCORE_PMC_IDX_FIXED + 1) 15#define UNCORE_PMC_IDX_MAX (UNCORE_PMC_IDX_FIXED + 1)