aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/oprofile
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-01-22 11:05:54 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-01-22 11:05:54 +0000
commit45dbcba70f350274666ba8bd1271740e4c244762 (patch)
treed50f0411eb09b341cf765ad0bc9b3a48e098c383 /xen/arch/x86/oprofile
parent5f4c1bb65edbbb91a5d173dc9fa7f1541a2cb826 (diff)
downloadxen-45dbcba70f350274666ba8bd1271740e4c244762.tar.gz
xen-45dbcba70f350274666ba8bd1271740e4c244762.tar.bz2
xen-45dbcba70f350274666ba8bd1271740e4c244762.zip
x86: Make the num_siblings CPU parameter per-CPU.
While it is unlikely that a system has a different number of siblings for different physical CPUs, make this parameter per-CPU for consistency, and deal with the (so far theoretical) case that this is different per CPU package. Signed-off-by: Frank van der Linden <Frank.Vanderlinden@Sun.COM>
Diffstat (limited to 'xen/arch/x86/oprofile')
-rw-r--r--xen/arch/x86/oprofile/nmi_int.c2
-rw-r--r--xen/arch/x86/oprofile/op_model_p4.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/xen/arch/x86/oprofile/nmi_int.c b/xen/arch/x86/oprofile/nmi_int.c
index ba58f2116d..c01adab4ab 100644
--- a/xen/arch/x86/oprofile/nmi_int.c
+++ b/xen/arch/x86/oprofile/nmi_int.c
@@ -326,7 +326,7 @@ static int __init p4_init(char ** cpu_type)
model = &op_p4_spec;
return 1;
#else
- switch (smp_num_siblings) {
+ switch (current_cpu_data.x86_num_siblings) {
case 1:
*cpu_type = "i386/p4";
model = &op_p4_spec;
diff --git a/xen/arch/x86/oprofile/op_model_p4.c b/xen/arch/x86/oprofile/op_model_p4.c
index 8fcb7ce0bc..589fdab4bf 100644
--- a/xen/arch/x86/oprofile/op_model_p4.c
+++ b/xen/arch/x86/oprofile/op_model_p4.c
@@ -41,7 +41,7 @@ static unsigned int num_counters = NUM_COUNTERS_NON_HT;
static inline void setup_num_counters(void)
{
#ifdef CONFIG_SMP
- if (smp_num_siblings == 2)
+ if (boot_cpu_data.x86_num_siblings == 2) /* XXX */
num_counters = NUM_COUNTERS_HT2;
#endif
}
@@ -49,7 +49,7 @@ static inline void setup_num_counters(void)
static int inline addr_increment(void)
{
#ifdef CONFIG_SMP
- return smp_num_siblings == 2 ? 2 : 1;
+ return boot_cpu_data.x86_num_siblings == 2 ? 2 : 1;
#else
return 1;
#endif