All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Andi Kleen <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	peterz@infradead.org, ak@linux.intel.com, tglx@linutronix.de
Subject: [tip:perf/core] perf/x86/intel/uncore: Fix PCU filter setup for Sandy/Ivy/Haswell EP
Date: Wed, 24 Sep 2014 08:00:53 -0700	[thread overview]
Message-ID: <tip-b10fc1c3e30c44033d1cb1d2900cc2ab06dff342@git.kernel.org> (raw)
In-Reply-To: <1409872109-31645-5-git-send-email-andi@firstfloor.org>

Commit-ID:  b10fc1c3e30c44033d1cb1d2900cc2ab06dff342
Gitweb:     http://git.kernel.org/tip/b10fc1c3e30c44033d1cb1d2900cc2ab06dff342
Author:     Andi Kleen <ak@linux.intel.com>
AuthorDate: Thu, 4 Sep 2014 16:08:29 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 24 Sep 2014 14:48:24 +0200

perf/x86/intel/uncore: Fix PCU filter setup for Sandy/Ivy/Haswell EP

The PCU frequency band filters use 8 bit each in a register.
When setting up the value the shift value was not correctly
scaled, which resulted in all filters except for band 0 to
be zero. Fix the scaling.

This allows to correctly monitor multiple uncore frequency bands.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: eranian@google.com
Link: http://lkml.kernel.org/r/1409872109-31645-5-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c b/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c
index b237abc..adf138e 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c
@@ -841,7 +841,7 @@ static int snbep_pcu_hw_config(struct intel_uncore_box *box, struct perf_event *
 	if (ev_sel >= 0xb && ev_sel <= 0xe) {
 		reg1->reg = SNBEP_PCU_MSR_PMON_BOX_FILTER;
 		reg1->idx = ev_sel - 0xb;
-		reg1->config = event->attr.config1 & (0xff << reg1->idx);
+		reg1->config = event->attr.config1 & (0xff << (reg1->idx * 8));
 	}
 	return 0;
 }

  reply	other threads:[~2014-09-24 15:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04 23:08 [PATCH 1/5] perf, x86, uncore: Fix section mismatch in split uncore driver Andi Kleen
2014-09-04 23:08 ` [PATCH 2/5] perf, x86, uncore: Add Haswell-EP uncore support Andi Kleen
2014-09-24 15:00   ` [tip:perf/core] perf/x86/intel/uncore: " tip-bot for Yan, Zheng
2014-10-22 19:07   ` [PATCH 2/5] perf, x86, uncore: " Alexei Starovoitov
2014-10-27 11:57     ` Andi Kleen
2014-09-04 23:08 ` [PATCH 3/5] perf, x86, uncore: Register the PMU only if the uncore pci device exists Andi Kleen
2014-09-24 15:00   ` [tip:perf/core] perf/x86/intel/uncore: " tip-bot for Yan, Zheng
2014-09-04 23:08 ` [PATCH 4/5] perf, x86, uncore: Add missing cbox filter flags on IvyBridge-EP uncore driver Andi Kleen
2014-09-24 15:00   ` [tip:perf/core] perf/x86/intel/uncore: " tip-bot for Andi Kleen
2014-09-04 23:08 ` [PATCH 5/5] perf, x86, uncore: Fix PCU filter setup for Sandy/Ivy/Haswell EP Andi Kleen
2014-09-24 15:00   ` tip-bot for Andi Kleen [this message]
2014-09-19  0:44 ` [PATCH 1/5] perf, x86, uncore: Fix section mismatch in split uncore driver Peter Zijlstra

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-b10fc1c3e30c44033d1cb1d2900cc2ab06dff342@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=ak@linux.intel.com \
    --cc=hpa@zytor.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 \
    /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.