aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/smpboot.c11
-rw-r--r--arch/x86/kernel/tsc.c8
2 files changed, 9 insertions, 10 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index ad59edd84de7..65a0ccdc3050 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -194,6 +194,12 @@ static void smp_callin(void)
194 smp_store_cpu_info(cpuid); 194 smp_store_cpu_info(cpuid);
195 195
196 /* 196 /*
197 * The topology information must be up to date before
198 * calibrate_delay() and notify_cpu_starting().
199 */
200 set_cpu_sibling_map(raw_smp_processor_id());
201
202 /*
197 * Get our bogomips. 203 * Get our bogomips.
198 * Update loops_per_jiffy in cpu_data. Previous call to 204 * Update loops_per_jiffy in cpu_data. Previous call to
199 * smp_store_cpu_info() stored a value that is close but not as 205 * smp_store_cpu_info() stored a value that is close but not as
@@ -203,11 +209,6 @@ static void smp_callin(void)
203 cpu_data(cpuid).loops_per_jiffy = loops_per_jiffy; 209 cpu_data(cpuid).loops_per_jiffy = loops_per_jiffy;
204 pr_debug("Stack at about %p\n", &cpuid); 210 pr_debug("Stack at about %p\n", &cpuid);
205 211
206 /*
207 * This must be done before setting cpu_online_mask
208 * or calling notify_cpu_starting.
209 */
210 set_cpu_sibling_map(raw_smp_processor_id());
211 wmb(); 212 wmb();
212 213
213 notify_cpu_starting(cpuid); 214 notify_cpu_starting(cpuid);
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 796d96bb0821..ad2b925a808e 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -1346,12 +1346,10 @@ void __init tsc_init(void)
1346unsigned long calibrate_delay_is_known(void) 1346unsigned long calibrate_delay_is_known(void)
1347{ 1347{
1348 int sibling, cpu = smp_processor_id(); 1348 int sibling, cpu = smp_processor_id();
1349 struct cpumask *mask = topology_core_cpumask(cpu); 1349 int constant_tsc = cpu_has(&cpu_data(cpu), X86_FEATURE_CONSTANT_TSC);
1350 const struct cpumask *mask = topology_core_cpumask(cpu);
1350 1351
1351 if (!tsc_disabled && !cpu_has(&cpu_data(cpu), X86_FEATURE_CONSTANT_TSC)) 1352 if (tsc_disabled || !constant_tsc || !mask)
1352 return 0;
1353
1354 if (!mask)
1355 return 0; 1353 return 0;
1356 1354
1357 sibling = cpumask_any_but(mask, cpu); 1355 sibling = cpumask_any_but(mask, cpu);