All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot for Yan, Zheng" <zheng.z.yan@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	a.p.zijlstra@chello.nl, acooks@gmail.com, zheng.z.yan@intel.com,
	tglx@linutronix.de
Subject: [tip:perf/core] perf/x86: Detect number of instances of uncore CBox
Date: Thu, 5 Jul 2012 23:32:15 -0700	[thread overview]
Message-ID: <tip-42089697244ba8e64fa43fb5e6d50d47a8e4cb00@git.kernel.org> (raw)
In-Reply-To: <1341381616-12229-4-git-send-email-zheng.z.yan@intel.com>

Commit-ID:  42089697244ba8e64fa43fb5e6d50d47a8e4cb00
Gitweb:     http://git.kernel.org/tip/42089697244ba8e64fa43fb5e6d50d47a8e4cb00
Author:     Yan, Zheng <zheng.z.yan@intel.com>
AuthorDate: Wed, 4 Jul 2012 14:00:14 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 5 Jul 2012 21:56:00 +0200

perf/x86: Detect number of instances of uncore CBox

The CBox manages the interface between the core and the LLC, so
the instances of uncore CBox is equal to number of cores.

Reported-by: Andrew Cooks <acooks@gmail.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/1341381616-12229-4-git-send-email-zheng.z.yan@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/cpu/perf_event_intel_uncore.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index 7d755d2..4fecbd0 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -1605,8 +1605,9 @@ static void __init uncore_cpu_setup(void *dummy)
 
 static int __init uncore_cpu_init(void)
 {
-	int ret, cpu;
+	int ret, cpu, max_cores;
 
+	max_cores = boot_cpu_data.x86_max_cores;
 	switch (boot_cpu_data.x86_model) {
 	case 26: /* Nehalem */
 	case 30:
@@ -1615,9 +1616,13 @@ static int __init uncore_cpu_init(void)
 		msr_uncores = nhm_msr_uncores;
 		break;
 	case 42: /* Sandy Bridge */
+		if (snb_uncore_cbox.num_boxes > max_cores)
+			snb_uncore_cbox.num_boxes = max_cores;
 		msr_uncores = snb_msr_uncores;
 		break;
 	case 45: /* Sandy Birdge-EP */
+		if (snbep_uncore_cbox.num_boxes > max_cores)
+			snbep_uncore_cbox.num_boxes = max_cores;
 		msr_uncores = snbep_msr_uncores;
 		break;
 	default:

  reply	other threads:[~2012-07-06  6:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-04  6:00 [PATCH 0/5] perf/x86: Uncore updates Yan, Zheng
2012-07-04  6:00 ` [PATCH 1/5] perf/x86: Use 0xff as pseudo code for fixed uncore event Yan, Zheng
2012-07-04  6:00 ` [PATCH 2/5] perf/x86: Fix event constraint for SandyBridge-EP CBox Yan, Zheng
2012-07-04  6:00 ` [PATCH 3/5] perf/x86: Detect number of instances of uncore CBox Yan, Zheng
2012-07-06  6:32   ` tip-bot for Yan, Zheng [this message]
2012-07-04  6:00 ` [PATCH 4/5] perf/x86: Uncore filter support for SandyBridge-EP Yan, Zheng
2012-07-06  6:33   ` [tip:perf/core] " tip-bot for Yan, Zheng
2012-07-22 19:25   ` [PATCH 4/5] " Stephane Eranian
2012-07-04  6:00 ` [PATCH 5/5] perf/x86: Add Intel Nehalem-EX uncore support Yan, Zheng
2012-07-04 10:04   ` Peter Zijlstra
2012-07-04 16:00     ` Yan, Zheng
2012-07-04 16:53       ` Peter Zijlstra
2012-07-04 17:46         ` Yan, Zheng 
2012-07-05  6:32     ` [PATCH V2 " Yan, Zheng
2012-07-05 14:51       ` Andi Kleen
2012-07-05 15:46         ` Yan, Zheng
2012-07-10 12:17       ` Peter Zijlstra
2012-07-11  2:06         ` Yan, Zheng
2012-07-11  9:57           ` Peter Zijlstra
2012-07-11 12:02             ` Yan, Zheng
2012-07-26 15:11       ` [tip:perf/core] " tip-bot for Yan, Zheng

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-42089697244ba8e64fa43fb5e6d50d47a8e4cb00@git.kernel.org \
    --to=zheng.z.yan@intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acooks@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.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.